Skip to content

Instantly share code, notes, and snippets.

@tnull
Last active September 20, 2016 14:15
Show Gist options
  • Save tnull/2f4506f274198e5bb1f23b61a7456b8e to your computer and use it in GitHub Desktop.
Save tnull/2f4506f274198e5bb1f23b61a7456b8e to your computer and use it in GitHub Desktop.
Little script to install erlang 19.0 with dirty schedulers, ssl and hipe support and elixir 1.3.2 (using kerl & kiex)
#!/bin/sh
DESTDIR="$HOME/workspace"
ACTIVATE="$DESTDIR/erlang/activate"
mkdir -p "$DESTDIR"
cd "$DESTDIR"
# get dependencies
sudo apt install autoconf libncurses-dev build-essential libssl-dev m4
# download kerl
curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl
chmod a+x kerl
# build erlang
./kerl update releases
KERL_CONFIGURE_DISABLE_APPLICATIONS="odbc" KERL_CONFIGURE_OPTIONS="--enable-dirty-schedulers --enable-hipe --with-openssl" ./kerl build 19.0 erlang.19.0.dirty_sched.hipe.ssl
# install erlang
./kerl install erlang.19.0.dirty_sched.hipe.ssl "$DESTDIR"/erlang
# activate & activate every session
echo "source $DESTDIR/erlang/activate" >> "$HOME/.bashrc"
source "$DESTDIR"/erlang/activate
# install kiex
curl -sSL https://raw.githubusercontent.com/taylor/kiex/master/install | bash -s
test -s "$HOME/.kiex/scripts/kiex" && . "$HOME/.kiex/scripts/kiex"
echo 'test -s "$HOME/.kiex/scripts/kiex" && . "$HOME/.kiex/scripts/kiex"' >> ~/.bashrc
# install elixir
kiex install 1.3.2
kiex use --default 1.3.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment