Last active
December 26, 2018 14:14
-
-
Save nukosuke/eaf6748c6dd1105f825d0a271306082b to your computer and use it in GitHub Desktop.
elixir開発環境セットアップ手順
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 | |
ERLANG_OTP_VERSION="21.2" | |
ELIXIR_VERSION="1.7.0" | |
if ! type git > /dev/null 2>&1; then | |
echo "git is not installed" | |
exit 1 | |
fi | |
git clone https://github.com/riywo/anyenv ~/.anyenv \ | |
&& echo 'export PATH="$HOME/.anyenv/bin:$PATH"' >> ~/.bash_profile \ | |
&& echo 'eval "$(anyenv init -)"' >> ~/.bash_profile \ | |
&& source ~/.bash_profile | |
if ! type anyenv > /dev/null 2>&1; then | |
echo "anyenv not found" | |
exit 1 | |
fi | |
anyenv install erlenv \ | |
&& wget http://www.erlang.org/download/otp_src_$ERLANG_OTP_VERSION.tar.gz \ | |
&& tar zxvf otp_src_$ERLANG_OTP_VERSION.tar.gz \ | |
&& cd otp_src_$ERLANG_OTP_VERSION \ | |
&& ./configure --prefix=$HOME/.anyenv/envs/erlenv/releases/$ERLANG_OTP_VERSION \ | |
&& make -j 4 \ | |
&& make install \ | |
&& erlenv global $ERLANG_OTP_VERSION \ | |
&& erlenv rehash \ | |
&& cd .. \ | |
&& rm -rf otp_src_$ERLANG_OTP_VERSION otp_src_$ERLANG_OTP_VERSION.tar.gz | |
anyenv install exenv \ | |
&& exenv install $ELIXIR_VERSION \ | |
&& exenv global $ELIXIR_VERSION |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment