Created
June 2, 2016 09:38
-
-
Save lessless/defd72780c16910ae6390af863f2a14b to your computer and use it in GitHub Desktop.
Codeship Elixir script
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
#!/bin/bash | |
# Totally c&p from various places all accross Internet | |
# | |
# Erlang | |
ERLANG_VERSION=${ERLANG_VERSION:-18.3} | |
ERLANG_CACHED_DOWNLOAD="${HOME}/cache/OTP-${ERLANG_VERSION}.tar.gz" | |
ERLANG_DIR=${ERLANG_DIR:="$HOME/erlang"} | |
# Elixir | |
ELIXIR_VERSION=${ELIXIR_VERSION:-1.2.5} | |
ELIXIR_CACHED_DOWNLOAD="${HOME}/cache/elixir-v${ELIXIR_VERSION}.zip" | |
ELIXIR_DIR=${ELIXIR_DIR:="$HOME/elixir"} | |
# Erlan download | |
echo Installing Erlang version ${ERLANG_VERSION} | |
wget --continue --output-document "${ERLANG_CACHED_DOWNLOAD}" "https://s3.amazonaws.com/heroku-buildpack-elixir/erlang/cedar-14/OTP-${ERLANG_VERSION}.tar.gz" | |
mkdir "${ERLANG_DIR}" | |
tar -xaf "${ERLANG_CACHED_DOWNLOAD}" --strip-components=1 --directory "${ERLANG_DIR}" | |
${ERLANG_DIR}/Install -minimal ${ERLANG_DIR} | |
export PATH="${ERLANG_DIR}/bin:$PATH" | |
# Elixir download | |
echo Installing Erlang version ${ELIXIR_VERSION} | |
wget --continue --output-document "${ELIXIR_CACHED_DOWNLOAD}" "https://s3.amazonaws.com/s3.hex.pm/builds/elixir/v${ELIXIR_VERSION}.zip" | |
mkdir ${ELIXIR_DIR} | |
cd ${ELIXIR_DIR} | |
unzip -q ${ELIXIR_CACHED_DOWNLOAD} | |
export PATH="${ELIXIR_DIR}/bin:$PATH" | |
cd - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment