bin/homedir-setup

Sat, 28 May 2016 18:30:33 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Sat, 28 May 2016 18:30:33 -0400
changeset 328
b3b18ced6949
parent 285
fefaa23c064c
child 381
b09db2db7f84
permissions
-rwxr-xr-x

add asdf-vm

#!/bin/sh
set -eu

if [ ! -f .zshrc ]; then
  echo "Refusing to run without a .zshrc nearby" >&2
  exit 1
fi

if ! git --version >/dev/null; then
  echo "Please install git!" >&2
  exit 1
fi

pull () {
  echo "$1:"
  git -C $1 pull --no-tags
}

if ! [ -d .zgen ]; then
  git clone https://github.com/tarjoilija/zgen.git .zgen
else
  pull .zgen
fi

if ! [ -d .plenv ]; then
  git clone https://github.com/tokuhirom/plenv.git .plenv
  git clone https://github.com/tokuhirom/Perl-Build.git .plenv/plugins/perl-build/
else
  pull .plenv
  pull .plenv/plugins/perl-build
fi

if ! [ -d .rbenv ]; then
  git clone https://github.com/sstephenson/rbenv.git .rbenv
  git clone https://github.com/sstephenson/ruby-build.git .rbenv/plugins/ruby-build/
else
  pull .rbenv
  pull .rbenv/plugins/ruby-build
fi

if ! [ -d .ndenv ]; then
  git clone https://github.com/riywo/ndenv.git .ndenv
  git clone https://github.com/riywo/node-build.git .ndenv/plugins/node-build
else
  pull .ndenv
  pull .ndenv/plugins/node-build
fi

if ! [ -d .asdf ]; then
  git clone https://github.com/asdf-vm/asdf .asdf
  git clone https://github.com/asdf-vm/asdf-erlang .asdf/plugins/erlang
  git clone https://github.com/asdf-vm/asdf-elixir .asdf/plugins/elixir
else
  pull .asdf
  pull .asdf/plugins/erlang
  pull .asdf/plugins/elixir
fi

mercurial