Created
May 16, 2014 18:27
-
-
Save chvanikoff/84f5ddf5061a42de6d58 to your computer and use it in GitHub Desktop.
This script fetches and puts RabbitMQ client and common libs to deps directory. For rebar: {pre_hooks, [{'get-deps', "./prefetch_rabbit"}]}.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
function install { | |
url=$1 | |
file=${url##*/} | |
name=${file%.*} | |
dest=${file%-*} | |
echo "Installing ${name}" | |
if [ -d deps/${dest} ]; then | |
echo "Already installed" | |
else | |
mkdir -p deps; | |
cd deps; | |
wget $url; | |
unzip $file | |
rm $file | |
mv ${name} ${dest} | |
cd -; | |
echo "Done" | |
fi | |
} | |
install http://www.rabbitmq.com/releases/rabbitmq-erlang-client/v3.2.3/amqp_client-3.2.3.ez | |
install http://www.rabbitmq.com/releases/rabbitmq-erlang-client/v3.2.3/rabbit_common-3.2.3.ez |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment