-
Notifications
You must be signed in to change notification settings - Fork 0
/
asdf_plugins.sh
executable file
·61 lines (50 loc) · 1.69 KB
/
asdf_plugins.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
#! /bin/bash
function handle_node_key_check() {
echo "Checking PGP Keys for node..."
set +m
bash ~/.asdf/plugins/nodejs/bin/import-release-team-keyring > /dev/null 2>&1 &
bg_pid=$!
printf "Keys are processing"
while kill -0 "$bg_pid" > /dev/null 2>&1; do
printf "."
sleep 1
done
wait $bg_pid
exit_code=$?
set -m
if [ $exit_code -ne 0 ]
then
printf "\nIssues with PGP keys\n"
return $exit_code 2> /dev/null || exit $exit_code
fi
printf "\nPGP Keys look good!\n"
}
# Move to $HOME so globals go to the right place
pushd "$HOME" > /dev/null 2>&1
# Add all plugins and update them
asdf plugin-add erlang https://github.com/asdf-vm/asdf-erlang.git
asdf plugin-add elixir https://github.com/asdf-vm/asdf-elixir.git
asdf plugin-add nodejs https://github.com/asdf-vm/asdf-nodejs.git
asdf plugin-add elm https://github.com/obmarg/asdf-elm.git
asdf plugin-add golang https://github.com/kennyp/asdf-golang.git
asdf plugin-add python
asdf plugin-add haskell https://github.com/vic/asdf-haskell.git
asdf plugin-add rust https://github.com/code-lever/asdf-rust.git
asdf plugin-add crystal https://github.com/marciogm/asdf-crystal.git
asdf plugin-add idris https://github.com/vic/asdf-idris.git
asdf plugin-add clojure https://github.com/vic/asdf-clojure.git
asdf plugin-add racket https://github.com/vic/asdf-racket.git
asdf plugin-add r https://github.com/iroddis/asdf-R
asdf plugin-update --all
# Do stupid PGP setup for node
# handle_node_key_check
while IFS= read -r line; do
echo setting "$line"
asdf global "$line"
done < ~/.tool-versions
# Install global versions
asdf install
# Add other versions
asdf install elm 0.17.1
# Return the user to prior location
popd > /dev/null 2>&1