Fri, 27 Jan 2017 12:27:12 -0500
Make this grey, not loud
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 | |
482
2c7cb331d2dc
Don't really need full clones
Meredith Howard <mhoward@roomag.org>
parents:
461
diff
changeset
|
20 | git clone --depth 1 'https://github.com/tarjoilija/zgen.git' .zgen |
245 | 21 | else |
22 | pull .zgen | |
486 | 23 | zsh -i -c 'zgen update' |
245 | 24 | fi |
25 | ||
26 | if ! [ -d .plenv ]; then | |
482
2c7cb331d2dc
Don't really need full clones
Meredith Howard <mhoward@roomag.org>
parents:
461
diff
changeset
|
27 | git clone --depth 1 'https://github.com/tokuhirom/plenv.git' .plenv |
2c7cb331d2dc
Don't really need full clones
Meredith Howard <mhoward@roomag.org>
parents:
461
diff
changeset
|
28 | git clone --depth 1 'https://github.com/tokuhirom/Perl-Build.git' .plenv/plugins/perl-build/ |
245 | 29 | else |
30 | pull .plenv | |
31 | pull .plenv/plugins/perl-build | |
32 | fi | |
33 | ||
381
b09db2db7f84
use ruby and nodejs plugins for asdf
Meredith Howard <mhoward@roomag.org>
parents:
328
diff
changeset
|
34 | if ! [ -d .asdf ]; then |
482
2c7cb331d2dc
Don't really need full clones
Meredith Howard <mhoward@roomag.org>
parents:
461
diff
changeset
|
35 | git clone --depth 1 'https://github.com/asdf-vm/asdf' .asdf |
245 | 36 | else |
381
b09db2db7f84
use ruby and nodejs plugins for asdf
Meredith Howard <mhoward@roomag.org>
parents:
328
diff
changeset
|
37 | pull .asdf |
245 | 38 | fi |
39 | ||
381
b09db2db7f84
use ruby and nodejs plugins for asdf
Meredith Howard <mhoward@roomag.org>
parents:
328
diff
changeset
|
40 | 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
|
41 | if ! [ -d .asdf/plugins/$LANG ]; then |
482
2c7cb331d2dc
Don't really need full clones
Meredith Howard <mhoward@roomag.org>
parents:
461
diff
changeset
|
42 | git clone --depth 1 "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
|
43 | else |
b09db2db7f84
use ruby and nodejs plugins for asdf
Meredith Howard <mhoward@roomag.org>
parents:
328
diff
changeset
|
44 | pull .asdf/plugins/$LANG |
b09db2db7f84
use ruby and nodejs plugins for asdf
Meredith Howard <mhoward@roomag.org>
parents:
328
diff
changeset
|
45 | fi |
b09db2db7f84
use ruby and nodejs plugins for asdf
Meredith Howard <mhoward@roomag.org>
parents:
328
diff
changeset
|
46 | done |
b09db2db7f84
use ruby and nodejs plugins for asdf
Meredith Howard <mhoward@roomag.org>
parents:
328
diff
changeset
|
47 | |
459
efa21f0b1dca
Remove rbenv & ndenv transition stuff
Meredith Howard <mhoward@roomag.org>
parents:
383
diff
changeset
|
48 | # Get rid of older stuff |
381
b09db2db7f84
use ruby and nodejs plugins for asdf
Meredith Howard <mhoward@roomag.org>
parents:
328
diff
changeset
|
49 | if [ -d .rbenv ]; then |
459
efa21f0b1dca
Remove rbenv & ndenv transition stuff
Meredith Howard <mhoward@roomag.org>
parents:
383
diff
changeset
|
50 | echo 'rbenv is still installed' >&2 |
245 | 51 | fi |
52 | ||
381
b09db2db7f84
use ruby and nodejs plugins for asdf
Meredith Howard <mhoward@roomag.org>
parents:
328
diff
changeset
|
53 | if [ -d .ndenv ]; then |
459
efa21f0b1dca
Remove rbenv & ndenv transition stuff
Meredith Howard <mhoward@roomag.org>
parents:
383
diff
changeset
|
54 | echo 'ndenv is still installed' >&2 |
328 | 55 | fi |