Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 62 lines (43 sloc) 1.74 KB
#!/usr/bin/env zsh
set -e -x
### homebrew #################################################################
# Make sure homebrew is installed
if [ ! -f /usr/local/bin/brew ]; then
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Install all brews from the Brewfile
brew bundle --file="$HOME/.home/Brewfile"
### rbenv ####################################################################
# Keep binaries outta my homedir
export RBENV_ROOT="/usr/local/rbenv"
# /usr/local is owned by root now, so sudo mkdir
[[ -d "$RBENV_ROOT" ]] ||
sudo install -d -o "$USER" -g admin -m 0775 "$RBENV_ROOT"
# Make a cache dir so we keep source tarballs
mkdir -p "$RBENV_ROOT/cache"
# Make sure we always install these gems
for gem in gem-browse bundler; do
grep -q "$gem" "$RBENV_ROOT/default-gems" ||
echo "$gem" >> "$RBENV_ROOT/default-gems"
done
# Install a standard version of rbenv
rbenv install --skip-existing --keep 2.4.1
# Use it as the default global version
rbenv global 2.4.1
### nodenv ###################################################################
# Keep binaries outta my homedir
export NODENV_ROOT="/usr/local/nodenv"
# /usr/local is owned by root now, so sudo mkdir
[[ -d "$NODENV_ROOT" ]] ||
sudo install -d -o "$USER" -g admin -m 0775 "$NODENV_ROOT"
# Make a cache dir so we keep source tarballs
mkdir -p "$NODENV_ROOT/cache"
# Make sure we always install these packages
for package in yarn; do
[[ -f "$NODENV_ROOT/default-packages" ]] && grep -q "$package" "$NODENV_ROOT/default-packages" ||
echo "$package" >> "$NODENV_ROOT/default-packages"
done
# Install a standard version of nodenv
nodenv install --skip-existing --keep 8.1.4
# Use it as the default global version
nodenv global 8.1.4