bin/homedir-setup

Thu, 18 Feb 2016 20:31:46 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Thu, 18 Feb 2016 20:31:46 -0500
changeset 260
52b31c74fe37
parent 249
5bba2e094584
child 275
c636b6086bb2
permissions
-rwxr-xr-x

Add some helpful DDP filters

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
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
3 set -eu
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
4
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
5 if ! git --version >/dev/null; then
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
6 echo "Please install git!"
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
7 exit 1
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
8 fi
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
9
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
10 pull () {
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
11 echo "$1:"
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
12 git -C $1 pull --no-tags
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
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
15 if ! [ -d .zgen ]; then
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
16 git clone https://github.com/tarjoilija/zgen.git .zgen
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
17 else
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
18 pull .zgen
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
19 fi
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
20
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
21 if ! [ -d .plenv ]; then
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
22 git clone https://github.com/tokuhirom/plenv.git .plenv
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
23 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
24 else
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
25 pull .plenv
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
26 pull .plenv/plugins/perl-build
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
27 fi
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
28
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
29 if ! [ -d .rbenv ]; then
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
30 git clone https://github.com/sstephenson/rbenv.git .rbenv
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
31 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
32 else
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
33 pull .rbenv
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
34 pull .rbenv/plugins/ruby-build
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
35 fi
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
36
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
37 if ! [ -d .ndenv ]; then
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
38 git clone https://github.com/riywo/ndenv.git .ndenv
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
39 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
40 else
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
41 pull .ndenv
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
42 pull .ndenv/plugins/node-build
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
43 fi
9fa186a70bbd add .homedir-setup.sh
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
44

mercurial