Skip to content

Instantly share code, notes, and snippets.

@cfsanderson
Last active July 4, 2017 04:35
Show Gist options
  • Save cfsanderson/caf26c5b62fa596a8dd89f1ca693f2eb to your computer and use it in GitHub Desktop.
Save cfsanderson/caf26c5b62fa596a8dd89f1ca693f2eb to your computer and use it in GitHub Desktop.
Install script for my dotfiles setup when migrating to a new machine.
git clone --bare https://github.com/cfsanderson/cfg-dotfiles.git $HOME/.cfg-dotfiles
function dotconfig {
/usr/bin/git --git-dir=$HOME/.cfg-dotfiles/ --work-tree=$HOME $@
echo "===== dotconfig function has run ====="
}
mkdir -p .dotconfig-backup
dotconfig checkout
if [ $? = 0 ]; then
echo "===== checked out dotconfig =====";
else
echo "===== backing up pre-existing dot files =====";
dotconfig checkout 2>&1 | egrep "\s+\." | awk {'print $1'} | xargs -I{} mv {} .dotconfig-backup/{}
fi;
dotconfig checkout
dotconfig config status.showUntrackedFiles no
echo "===== Step 2: Install Homebrew ====="
echo "===== 'curl -Lks https://goo.gl/5LyA5C | bash' ====="
echo "===== check to make sure terminal is running correctly - resource ====="
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment