My dotfiles. Period.

setup 656B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. git_binary=`which git`
  3. if [[ -x $HOME/bin/git ]]; then
  4. git_binary=$HOME/bin/git
  5. fi
  6. gitver=`$git_binary --version | cut -d ' ' -f 3`
  7. if [[ "$gitver" > "1.8" ]]; then
  8. tilde='~'
  9. else
  10. tilde=$HOME
  11. fi
  12. host=`hostname -s`
  13. user=`whoami`
  14. printf "[include]\n" >> ~/.gitconfig
  15. printf " path = $tilde/.gittum/before.gitconfig\n" >> ~/.gitconfig
  16. printf " path = $tilde/.gittum/host/$host.gitconfig\n" >> ~/.gitconfig
  17. printf " path = $tilde/.gittum/user/$user.gitconfig\n" >> ~/.gitconfig
  18. printf " path = $tilde/.gittum/private/gitconfig\n" >> ~/.gitconfig
  19. printf " path = $tilde/.gittum/after.gitconfig\n" >> ~/.gitconfig