Skip to content

Commit 25c2805

Browse files
committed
Use kerl to manage OTP installation
1 parent 5f4baee commit 25c2805

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

script/ci/prepare.sh

+5-13
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,17 @@ export ELIXIR_VERSION="v1.6.0"
1111

1212
export ERLANG_PATH="$INSTALL_PATH/otp_src_$ERLANG_VERSION"
1313
export ELIXIR_PATH="$INSTALL_PATH/elixir_$ELIXIR_VERSION"
14+
export KERL_PATH="$INSTALL_PATH/bin/kerl"
1415

1516
mkdir -p $INSTALL_PATH
1617
cd $INSTALL_PATH
1718

1819
# Install erlang
1920
if [ ! -e $INSTALL_PATH/bin/erl ]; then
20-
curl -L -O http://www.erlang.org/download/otp_src_$ERLANG_VERSION.tar.gz
21-
tar xzf otp_src_$ERLANG_VERSION.tar.gz
22-
cd $ERLANG_PATH
23-
./configure --enable-smp-support \
24-
--enable-m64-build \
25-
--disable-native-libs \
26-
--disable-sctp \
27-
--enable-threads \
28-
--enable-kernel-poll \
29-
--disable-hipe \
30-
--without-javac \
31-
--prefix=$INSTALL_PATH
32-
make install
21+
curl https://raw.githubusercontent.com/kerl/kerl/master/kerl -o $KERL_PATH
22+
chmod a+x $KERL_PATH
23+
$KERL_PATH build $ERLANG_VERSION $ERLANG_VERSION
24+
$KERL_PATH install $ERLANG_VERSION $INSTALL_PATH
3325
else
3426
echo "Erlang already installed."
3527
fi

0 commit comments

Comments
 (0)