Skip to content

Instantly share code, notes, and snippets.

@huseyinyilmaz
Last active August 29, 2015 14:16
Show Gist options
  • Select an option

  • Save huseyinyilmaz/e1c531590f943ca6c7ef to your computer and use it in GitHub Desktop.

Select an option

Save huseyinyilmaz/e1c531590f943ca6c7ef to your computer and use it in GitHub Desktop.
compile_publicator.sh
#!/bin/bash
# -*- tab-width:4;indent-tabs-mode:nil -*-
# ex: ts=4 sw=4 et
#
# This script downloads and compiles publicator
#
# USAGE:
# To build master branch:
# $ ./compile_publicator.sh
# To build specific tag provide tag number as argument
# $ ./compile_publicator.sh 0.2.0
# notice that v prefix is not written to this command.
#
# DEPENDENCIES
# following applications should be reachable from command line
# git
# erlang
# unzip
#
#
# if tag is not provided use master branch
TAG=${1:-master}
DIRECTORY=publicator-$TAG
if [ -z "${1}" ]; then
ZIP_FILE=$TAG.zip
else
ZIP_FILE=v$TAG.zip
fi
wget https://github.com/huseyinyilmaz/publicator/archive/$ZIP_FILE
unzip $ZIP_FILE
cd $DIRECTORY
make configure release
mv publicator.tar.gz ../
cd ..
rm -rf $DIRECTORY
rm $ZIP_FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment