Wed, 18 May 2016 23:58:26 -0400
pointless maps
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 |