bin/homedir-setup

Sun, 09 Jan 2022 14:57:39 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Sun, 09 Jan 2022 14:57:39 -0500
changeset 965
f1e5d30543ba
parent 964
72a7a0ffbce8
child 966
e1132c1cce12
permissions
-rwxr-xr-x

forget the minimal setup mode

#!/bin/bash
set -euo pipefail

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

clone_or_pull() {
  if ! [ -d $2 ]; then
    git clone --depth 1 "$1" $2
  else
    echo "$2:"
    git -C "$2" pull --no-tags
  fi
}

clone_or_pull 'https://github.com/tarjoilija/zgen.git' .zgen

zsh -i -c 'zgen update' || :

clone_or_pull 'https://github.com/asdf-vm/asdf' .asdf
source .asdf/asdf.sh

asdf plugin add perl || :
asdf plugin update --all

bin/setup-man || :

# Get rid of older stuff
for OLD in .plenv .rbenv .ndenv; do
  if [ -e $OLD ]; then
    echo "Pruning $OLD" >&2
    rm -rf $OLD
  fi
done

mercurial