#!/bin/sh . $HOME/src/dotfiles/.shenv # Bootstrap home directory after dotfiles repository successfully # cloned (see ~/bin/insinuate-dotfiles). This script should # definitely be POSIX sh set -e # ---- Perform the bootstrap $HOME/src/dotfiles/bin/normalise-mrconfig ( cd $HOME/src/dotfiles mr fixups mr stow if [ -z $(git remote) ]; then # don't set up any tracking branches or fetch it git remote add origin athena:dotfiles fi ) echo "I: dotfiles bootstrap successful" # ---- Check if there is a host-specific branch hostname="$(hostname -s)" if ! [ "$hostname" = "master" ] \ && ( cd "$HOME/src/dotfiles" && git branch -a | grep "origin/$hostname" ); then echo "I: there is a host-specific dotfiles branch for this host" echo "I: consider checking it out" fi