My dotfiles. Period.

123456789101112131415161718192021
  1. #!/bin/bash
  2. gitver=$(git --version | cut -d ' ' -f 3)
  3. if [[ "x$gitver" > "x1.8" ]]; then
  4. tilde='~'
  5. else
  6. tilde=$HOME
  7. fi
  8. host=$(hostname -s)
  9. user=$(whoami)
  10. mkconfig() {
  11. echo "[include]"
  12. echo " path = $tilde/.config/gittum/main.gitconfig"
  13. echo " path = $tilde/.config/gittum/host/$host.gitconfig"
  14. echo " path = $tilde/.config/gittum/user/$user.gitconfig"
  15. echo " path = $tilde/.config/gittum/private.gitconfig"
  16. }
  17. mkconfig >>"$HOME/.gitconfig"