-
Notifications
You must be signed in to change notification settings - Fork 0
/
anyenv.sh
executable file
·63 lines (51 loc) · 1.1 KB
/
anyenv.sh
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
ANYENV_ROOT=~/.anyenv
is_exsists() {
which "$1" >/dev/null 2>&1
return $?
}
if ! is_exsists "anyenv"; then
echo "==> Installing anyenv..."
git clone https://github.com/anyenv/anyenv ~/.anyenv
anyenv install --force-init
source ~/.zshrc
echo "anyenv"
fi
# anyenv
if [ ! -d ${ANYENV_ROOT}/plugins ]; then
mkdir -p ${ANYENV_ROOT}/plugins
git clone https://github.com/znz/anyenv-update.git ${ANYENV_ROOT}/plugins/anyenv-update
git clone https://github.com/znz/anyenv-git.git ${ANYENV_ROOT}/plugins/anyenv-git
fi
# node
if ! is_exsists "nodenv"; then
anyenv install nodenv
source ~/.zshrc
nodenv install 13.1.0
nodenv global 13.1.0
echo "node -v"
node -v
echo "npm -v"
npm -v
fi
# go
if ! is_exsists "goenv"; then
anyenv install goenv
source ~/.zshrc
goenv install 1.13.1
goenv global 1.13.1
goenv rehash
echo "go version"
go version
fi
# scala
if ! is_exsists "scalaenv"; then
anyenv install scalaenv
source ~/.zshrc
scalaenv install scala-2.12.8
scalaenv global scala-2.12.8
echo "scala version"
scala -version
fi
# sbtenv
# todo