-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall-otp.sh
More file actions
35 lines (28 loc) · 990 Bytes
/
install-otp.sh
File metadata and controls
35 lines (28 loc) · 990 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
if [ -z "${ASDF_DIR:-}" ]; then
if [ -d "${HOME}/.asdf" ]; then
export ASDF_DIR="${HOME}/.asdf"
echo "### Detected existing asdf directory " $ASDF_DIR
else
export ASDF_DIR="$(pwd)/asdf"
echo "### Setting local asdf directory " $ASDF_DIR
fi
else
echo "### ASDF_DIR already defined"
fi
if [ -z "${ASDF_DATA_DIR:-}" ]; then
export ASDF_DATA_DIR=$ASDF_DIR
echo "### ASDF_DATA_DIR not set. Setting to " $ASDF_DATA_DIR
fi
if [ ! -d $ASDF_DIR ]; then
echo "### ASDF_DIR points to a non-existent directory. Installing there."
git clone https://github.com/asdf-vm/asdf.git $ASDF_DIR --branch v0.14.0
fi
source "${ASDF_DIR}/asdf.sh"
asdf plugin add erlang https://github.com/asdf-vm/asdf-erlang.git || true
asdf plugin add elixir https://github.com/asdf-vm/asdf-elixir.git || true
echo "erlang 26.2.2" > .tool-versions
echo "elixir 1.14" >> .tool-versions
asdf install
asdf local erlang 26.2.2
asdf local elixir 1.14
asdf reshim