-
-
Save evax/493c134b7c6711b499f0 to your computer and use it in GitHub Desktop.
I use this to install Elixir on Codeship.
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/sh | |
# Forked from https://gist.github.com/jamesotron/44f8962cddef781ab830 | |
# wget https://gist.githubusercontent.com/evax/493c134b7c6711b499f0/raw/6d4aaf11b9f041cd77bc273691579d0fe7f72c9c/install_ex.sh | |
# . ~/install_ex.sh | |
# You can override your Elixir and Erlang versions from your shell when you call ./install_ex.sh. | |
ERLANG_VERSION=${ERLANG_VERSION:-18.3} | |
ELIXIR_VERSION=${ELIXIR_VERSION:-1.2.3} | |
# Erlang | |
echo Installing Erlang version ${ERLANG_VERSION} | |
wget "https://s3.amazonaws.com/heroku-buildpack-elixir/erlang/cedar-14/OTP-${ERLANG_VERSION}.tar.gz" | |
tar zxf OTP-${ERLANG_VERSION}.tar.gz | |
ERL_PATH=$(realpath ~/OTP-${ERLANG_VERSION}) | |
${ERL_PATH}/Install -minimal ${ERL_PATH} | |
export PATH="${ERL_PATH}/bin:$PATH" | |
# Elixir | |
echo Installing Elixir version ${ELIXIR_VERSION} | |
wget "https://s3.amazonaws.com/s3.hex.pm/builds/elixir/v${ELIXIR_VERSION}.zip" | |
mkdir ~/elixir-${ELIXIR_VERSION} | |
EX_PATH=$(realpath ~/elixir-${ELIXIR_VERSION}) | |
cd ${EX_PATH} | |
unzip -q ../v${ELIXIR_VERSION}.zip | |
export PATH="${EX_PATH}/bin:$PATH" | |
mix local.hex --force | |
mix local.rebar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment