Thu, 04 Aug 2016 15:01:12 -0400
fixup and doc for cygwin/babun
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 | ||
14 | pull () { | |
15 | echo "$1:" | |
16 | git -C $1 pull --no-tags | |
17 | } | |
18 | ||
19 | if ! [ -d .zgen ]; then | |
20 | git clone https://github.com/tarjoilija/zgen.git .zgen | |
21 | else | |
22 | pull .zgen | |
23 | fi | |
24 | ||
25 | if ! [ -d .plenv ]; then | |
26 | git clone https://github.com/tokuhirom/plenv.git .plenv | |
27 | git clone https://github.com/tokuhirom/Perl-Build.git .plenv/plugins/perl-build/ | |
28 | else | |
29 | pull .plenv | |
30 | pull .plenv/plugins/perl-build | |
31 | fi | |
32 | ||
33 | if ! [ -d .rbenv ]; then | |
34 | git clone https://github.com/sstephenson/rbenv.git .rbenv | |
35 | git clone https://github.com/sstephenson/ruby-build.git .rbenv/plugins/ruby-build/ | |
36 | else | |
37 | pull .rbenv | |
38 | pull .rbenv/plugins/ruby-build | |
39 | fi | |
40 | ||
41 | if ! [ -d .ndenv ]; then | |
42 | git clone https://github.com/riywo/ndenv.git .ndenv | |
43 | git clone https://github.com/riywo/node-build.git .ndenv/plugins/node-build | |
44 | else | |
45 | pull .ndenv | |
46 | pull .ndenv/plugins/node-build | |
47 | fi | |
48 | ||
328 | 49 | if ! [ -d .asdf ]; then |
50 | git clone https://github.com/asdf-vm/asdf .asdf | |
51 | git clone https://github.com/asdf-vm/asdf-erlang .asdf/plugins/erlang | |
52 | git clone https://github.com/asdf-vm/asdf-elixir .asdf/plugins/elixir | |
53 | else | |
54 | pull .asdf | |
55 | pull .asdf/plugins/erlang | |
56 | pull .asdf/plugins/elixir | |
57 | fi | |
58 |