#!/bin/bash git_binary=`which git` if [[ -x $HOME/bin/git ]]; then git_binary=$HOME/bin/git fi gitver=`$git_binary --version | cut -d ' ' -f 3` if [[ "$gitver" > "1.8" ]]; then tilde='~' else tilde=$HOME fi host=`hostname -s` user=`whoami` printf "[include]\n" >> ~/.gitconfig printf " path = $tilde/.gittum/before.gitconfig\n" >> ~/.gitconfig printf " path = $tilde/.gittum/host/$host.gitconfig\n" >> ~/.gitconfig printf " path = $tilde/.gittum/user/$user.gitconfig\n" >> ~/.gitconfig printf " path = $tilde/.gittum/private/gitconfig\n" >> ~/.gitconfig printf " path = $tilde/.gittum/after.gitconfig\n" >> ~/.gitconfig