-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_code.sh
58 lines (44 loc) · 1.97 KB
/
install_code.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
export bin_path=/usr/local/bin
# asdf
echo -e "\n\n\n\n\nasdf\n\n\n\n\n"
git clone https://github.com/asdf-vm/asdf.git ~/.asdf
. "$HOME/.asdf/asdf.sh"
export GOPATH=$HOME/go
export GOPROXY=direct
export CGO_ENABLED=0
export ASDF_GOLANG_MOD_VERSION_ENABLED=true
cp -r ~/.asdfrc ~/.asdfrc.old >>/dev/null
rm -f ~/.asdfrc >>/dev/null
ln -s ~/code/private/dotfiles/asdfrc ~/.asdfrc
cp -r ~/.tool-versions ~/.tool-versions.old >>/dev/null
rm -f ~/.tool-versions >>/dev/null
ln -s ~/code/private/dotfiles/tool-versions ~/.tool-versions
cp -r ~/.default-gems ~/.default-gems.old >>/dev/null
rm -f ~/.default-gems >>/dev/null
ln -s ~/code/private/dotfiles/default-gems ~/.default-gems
cp -r ~/.default-golang-pkgs ~/.default-golang-pkgs.old >>/dev/null
rm -f ~/.default-golang-pkgs >>/dev/null
ln -s ~/code/private/dotfiles/default-golang-pkgs ~/.default-golang-pkgs
asdf plugin add golang https://github.com/kennyp/asdf-golang.git
asdf plugin-add kubectl https://github.com/asdf-community/asdf-kubectl.git
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf plugin add ruby https://github.com/asdf-vm/asdf-ruby.git
asdf plugin add terraform https://github.com/Banno/asdf-hashicorp.git
asdf plugin add terragrunt https://github.com/ohmer/asdf-terragrunt.git
asdf plugin add yarn https://github.com/twuni/asdf-yarn.git
asdf install
# direnv
echo -e "\n\n\n\n\ninstalling tools\n\n\n\n\n"
echo -e "DirEnv\n"
curl -sfL https://direnv.net/install.sh | bash
mkdir -p ~/.config/direnv
cp -r ~/.config/direnv/direnv.toml ~/.config/direnv/direnv.toml.old >>/dev/null
rm -f ~/.config/direnv/direnv.toml >>/dev/null
ln -s ~/code/private/dotfiles/direnv.toml ~/.config/direnv/direnv.toml
# yarn
echo -e "yarn\n"
mkdir -p ~/.config/yarn/global
cp -r ~/.config/yarn/global/package.json ~/.config/yarn/global/package.json.old >>/dev/null
rm -f ~/.config/yarn/global/package.json >>/dev/null
ln -s ~/code/private/dotfiles/package.json ~/.config/yarn/global/package.json
yarn install --cwd ~/.config/yarn/global