My dotfiles. Period.

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`
  13. user=`whoami`
  14. printf "[include]\n" >> ~/.gitconfig
  15. printf " path = $tilde/.git-universe/before.gitconfig\n" >> ~/.gitconfig
  16. printf " path = $tilde/.git-universe/host/$host.gitconfig\n" >> ~/.gitconfig
  17. printf " path = $tilde/.git-universe/user/$user.gitconfig\n" >> ~/.gitconfig
  18. printf " path = $tilde/.git-universe/private/gitconfig\n" >> ~/.gitconfig
  19. printf " path = $tilde/.git-universe/after.gitconfig\n" >> ~/.gitconfig