Sun, 09 Jan 2022 15:14:11 -0500
clean up
#!/bin/bash set -euo pipefail warn() { echo "$*" >&2; } die() { warn "$*"; exit 1; } clone_or_pull() { if ! [ -d $2 ]; then git clone --single-branch --depth 1 "$1" $2 else echo "$2:" git -C "$2" pull fi } [ -f .zshrc ] || die "Refusing to run without a .zshrc nearby" git --version >/dev/null || die "Please install git!" 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 warn "Pruning $OLD" rm -rf $OLD fi done