Created
December 5, 2016 02:47
-
-
Save vyskocilm/d3ccc25a0704eda0a40ce9e55d872817 to your computer and use it in GitHub Desktop.
buildzmq.sh
This file contains hidden or 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
#!/bin/bash | |
# build ZeroMQ stack and install to /usr/local/ | |
die () { | |
echo "FATAL: $@" >&2 | |
exit 1 | |
} | |
touch /usr/local/_test || die "Make /usr/local accessible again (chmod a+rwx)" | |
rm /usr/local/_test | |
for repo in libzmq czmq malamute zyre; do | |
if [[ -d "${repo}.git" ]]; then | |
pushd "${repo}.git" | |
git pull | |
popd | |
else | |
git clone https://github.com/zeromq/${repo} "${repo}.git" || die "git clone failed" | |
fi | |
pushd "${repo}.git" | |
./autogen.sh | |
./configure | |
make | |
make check | |
make install | |
popd | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment