Created
January 21, 2016 21:05
-
-
Save paegun/f581bd8a8a467bd846fb to your computer and use it in GitHub Desktop.
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 sh | |
VERSION="R16B02-basho8" | |
VERSION_U=$(echo $VERSION |tr '-' '_') | |
eval $(ssh-agent -s) | |
for i in ls ~/.ssh/*; do | |
case $i in | |
*id_*.pub) | |
: | |
;; | |
*id_*) | |
ssh-add $i </dev/null | |
;; | |
esac | |
done | |
sudo apt-get install -y curl build-essential autoconf libncurses5-dev openssl libssl-dev | |
sudo mkdir -p /opt/erlang/ | |
curl -O https://raw.githubusercontent.com/spawngrid/kerl/master/kerl | |
chmod a+x kerl | |
sudo mv kerl /opt/erlang/ | |
sudo ln -s /opt/erlang/kerl /usr/local/bin/kerl | |
# since VERSION is not a standard OTP release, | |
# kerl update releases | |
# kerl build ${VERSION} ${VERSION} | |
CFLAGS="-DOPENSSL_NO_EC=1" \ | |
kerl build git git://github.com/basho/otp.git OTP_${VERSION_U} ${VERSION} | |
sudo kerl install ${VERSION} /opt/erlang/${VERSION} | |
if [ ! -e /opt/erlang/current ]; then | |
sudo ln -s /opt/erlang/${VERSION} /opt/erlang/current | |
fi | |
cd /usr/local/bin | |
sudo find /opt/erlang/current/bin -exec ln -s '{}' \; | |
. /opt/erlang/current/activate | |
sudo bash -c "cat > /etc/profile.d/kerl_activate.sh" <<EOF | |
. /opt/erlang/current/activate | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment