Skip to content

Commit 357536f

Browse files
author
Gaspar Chilingarov
committed
add script to fetch correct versions of OTP/Elixir sources.
1 parent 4d3bc9d commit 357536f

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

get_otp_elixir_sources.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
CWD=$(dirname $(readlink -f $0))
4+
cd $CWD
5+
6+
[ -d sources ] || mkdir sources
7+
8+
cd $CWD/sources
9+
10+
if [ ! -d "otp" ]; then
11+
OTP_VERSION=`erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell | sed -e 's/"//g' -e 's///g'`
12+
echo "Checking out Erlang/OTP $OTP_VERSION"
13+
OTP_BRANCH="maint-$OTP_VERSION"
14+
git clone --depth 1 -b $OTP_BRANCH https://github.com/erlang/otp.git
15+
fi
16+
17+
if [ ! -d "elixir" ]; then
18+
ELIXIR_VERSION=`elixir -v | awk '/^Elixir/ {print $2}'`
19+
ELIXIR_TAG="v${ELIXIR_VERSION}"
20+
21+
echo "Checking out Elixir $ELIXIR_VERSION"
22+
git clone --depth 1 -b $ELIXIR_TAG https://github.com/elixir-lang/elixir.git
23+
fi

0 commit comments

Comments
 (0)