bin/homedir-setup

Mon, 18 Jul 2016 13:38:23 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Mon, 18 Jul 2016 13:38:23 -0400
changeset 352
a19225f9b247
parent 328
b3b18ced6949
child 381
b09db2db7f84
permissions
-rwxr-xr-x

Numbered-list wrap doesn't work for flowed emails

245
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
1 #!/bin/sh
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
2 set -eu
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
3
285
fefaa23c064c Add check for .zshrc
Meredith Howard <mhoward@roomag.org>
parents: 275
diff changeset
4 if [ ! -f .zshrc ]; then
fefaa23c064c Add check for .zshrc
Meredith Howard <mhoward@roomag.org>
parents: 275
diff changeset
5 echo "Refusing to run without a .zshrc nearby" >&2
fefaa23c064c Add check for .zshrc
Meredith Howard <mhoward@roomag.org>
parents: 275
diff changeset
6 exit 1
fefaa23c064c Add check for .zshrc
Meredith Howard <mhoward@roomag.org>
parents: 275
diff changeset
7 fi
fefaa23c064c Add check for .zshrc
Meredith Howard <mhoward@roomag.org>
parents: 275
diff changeset
8
245
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
9 if ! git --version >/dev/null; then
285
fefaa23c064c Add check for .zshrc
Meredith Howard <mhoward@roomag.org>
parents: 275
diff changeset
10 echo "Please install git!" >&2
245
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
11 exit 1
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
12 fi
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
13
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
14 pull () {
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
15 echo "$1:"
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
16 git -C $1 pull --no-tags
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
17 }
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
18
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
19 if ! [ -d .zgen ]; then
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
20 git clone https://github.com/tarjoilija/zgen.git .zgen
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
21 else
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
22 pull .zgen
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
23 fi
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
24
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
25 if ! [ -d .plenv ]; then
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
26 git clone https://github.com/tokuhirom/plenv.git .plenv
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
27 git clone https://github.com/tokuhirom/Perl-Build.git .plenv/plugins/perl-build/
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
28 else
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
29 pull .plenv
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
30 pull .plenv/plugins/perl-build
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
31 fi
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
32
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
33 if ! [ -d .rbenv ]; then
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
34 git clone https://github.com/sstephenson/rbenv.git .rbenv
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
35 git clone https://github.com/sstephenson/ruby-build.git .rbenv/plugins/ruby-build/
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
36 else
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
37 pull .rbenv
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
38 pull .rbenv/plugins/ruby-build
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
39 fi
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
40
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
41 if ! [ -d .ndenv ]; then
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
42 git clone https://github.com/riywo/ndenv.git .ndenv
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
43 git clone https://github.com/riywo/node-build.git .ndenv/plugins/node-build
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
44 else
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
45 pull .ndenv
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
46 pull .ndenv/plugins/node-build
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
47 fi
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
48
328
b3b18ced6949 add asdf-vm
Meredith Howard <mhoward@roomag.org>
parents: 285
diff changeset
49 if ! [ -d .asdf ]; then
b3b18ced6949 add asdf-vm
Meredith Howard <mhoward@roomag.org>
parents: 285
diff changeset
50 git clone https://github.com/asdf-vm/asdf .asdf
b3b18ced6949 add asdf-vm
Meredith Howard <mhoward@roomag.org>
parents: 285
diff changeset
51 git clone https://github.com/asdf-vm/asdf-erlang .asdf/plugins/erlang
b3b18ced6949 add asdf-vm
Meredith Howard <mhoward@roomag.org>
parents: 285
diff changeset
52 git clone https://github.com/asdf-vm/asdf-elixir .asdf/plugins/elixir
b3b18ced6949 add asdf-vm
Meredith Howard <mhoward@roomag.org>
parents: 285
diff changeset
53 else
b3b18ced6949 add asdf-vm
Meredith Howard <mhoward@roomag.org>
parents: 285
diff changeset
54 pull .asdf
b3b18ced6949 add asdf-vm
Meredith Howard <mhoward@roomag.org>
parents: 285
diff changeset
55 pull .asdf/plugins/erlang
b3b18ced6949 add asdf-vm
Meredith Howard <mhoward@roomag.org>
parents: 285
diff changeset
56 pull .asdf/plugins/elixir
b3b18ced6949 add asdf-vm
Meredith Howard <mhoward@roomag.org>
parents: 285
diff changeset
57 fi
b3b18ced6949 add asdf-vm
Meredith Howard <mhoward@roomag.org>
parents: 285
diff changeset
58

mercurial