Fri, 20 Jan 2017 10:23:27 -0500
no background
245 | 1 | #!/bin/sh |
2 | set -eu | |
3 | ||
285 | 4 | if [ ! -f .zshrc ]; then |
5 | echo "Refusing to run without a .zshrc nearby" >&2 | |
6 | exit 1 | |
7 | fi | |
8 | ||
245 | 9 | if ! git --version >/dev/null; then |
285 | 10 | echo "Please install git!" >&2 |
245 | 11 | exit 1 |
12 | fi | |
13 | ||
459
efa21f0b1dca
Remove rbenv & ndenv transition stuff
Meredith Howard <mhoward@roomag.org>
parents:
383
diff
changeset
|
14 | pull() { |
245 | 15 | echo "$1:" |
459
efa21f0b1dca
Remove rbenv & ndenv transition stuff
Meredith Howard <mhoward@roomag.org>
parents:
383
diff
changeset
|
16 | git -C "$1" pull --no-tags |
245 | 17 | } |
18 | ||
19 | if ! [ -d .zgen ]; then | |
461 | 20 | git clone 'https://github.com/tarjoilija/zgen.git' .zgen |
245 | 21 | else |
22 | pull .zgen | |
23 | fi | |
24 | ||
25 | if ! [ -d .plenv ]; then | |
461 | 26 | git clone 'https://github.com/tokuhirom/plenv.git' .plenv |
27 | git clone 'https://github.com/tokuhirom/Perl-Build.git' .plenv/plugins/perl-build/ | |
245 | 28 | else |
29 | pull .plenv | |
30 | pull .plenv/plugins/perl-build | |
31 | fi | |
32 | ||
381
b09db2db7f84
use ruby and nodejs plugins for asdf
Meredith Howard <mhoward@roomag.org>
parents:
328
diff
changeset
|
33 | if ! [ -d .asdf ]; then |
461 | 34 | git clone 'https://github.com/asdf-vm/asdf' .asdf |
245 | 35 | else |
381
b09db2db7f84
use ruby and nodejs plugins for asdf
Meredith Howard <mhoward@roomag.org>
parents:
328
diff
changeset
|
36 | pull .asdf |
245 | 37 | fi |
38 | ||
381
b09db2db7f84
use ruby and nodejs plugins for asdf
Meredith Howard <mhoward@roomag.org>
parents:
328
diff
changeset
|
39 | for LANG in ruby nodejs erlang elixir; do |
b09db2db7f84
use ruby and nodejs plugins for asdf
Meredith Howard <mhoward@roomag.org>
parents:
328
diff
changeset
|
40 | if ! [ -d .asdf/plugins/$LANG ]; then |
461 | 41 | git clone "https://github.com/asdf-vm/asdf-$LANG" .asdf/plugins/$LANG |
381
b09db2db7f84
use ruby and nodejs plugins for asdf
Meredith Howard <mhoward@roomag.org>
parents:
328
diff
changeset
|
42 | else |
b09db2db7f84
use ruby and nodejs plugins for asdf
Meredith Howard <mhoward@roomag.org>
parents:
328
diff
changeset
|
43 | pull .asdf/plugins/$LANG |
b09db2db7f84
use ruby and nodejs plugins for asdf
Meredith Howard <mhoward@roomag.org>
parents:
328
diff
changeset
|
44 | fi |
b09db2db7f84
use ruby and nodejs plugins for asdf
Meredith Howard <mhoward@roomag.org>
parents:
328
diff
changeset
|
45 | done |
b09db2db7f84
use ruby and nodejs plugins for asdf
Meredith Howard <mhoward@roomag.org>
parents:
328
diff
changeset
|
46 | |
459
efa21f0b1dca
Remove rbenv & ndenv transition stuff
Meredith Howard <mhoward@roomag.org>
parents:
383
diff
changeset
|
47 | # Get rid of older stuff |
381
b09db2db7f84
use ruby and nodejs plugins for asdf
Meredith Howard <mhoward@roomag.org>
parents:
328
diff
changeset
|
48 | if [ -d .rbenv ]; then |
459
efa21f0b1dca
Remove rbenv & ndenv transition stuff
Meredith Howard <mhoward@roomag.org>
parents:
383
diff
changeset
|
49 | echo 'rbenv is still installed' >&2 |
245 | 50 | fi |
51 | ||
381
b09db2db7f84
use ruby and nodejs plugins for asdf
Meredith Howard <mhoward@roomag.org>
parents:
328
diff
changeset
|
52 | if [ -d .ndenv ]; then |
459
efa21f0b1dca
Remove rbenv & ndenv transition stuff
Meredith Howard <mhoward@roomag.org>
parents:
383
diff
changeset
|
53 | echo 'ndenv is still installed' >&2 |
328 | 54 | fi |