12345678910111213141516171819202122 |
- #!/bin/sh
-
- gitver=`git --version | cut -d ' ' -f 3`
-
- if [ "$gitver" > "1.8" ]; then
- tilde='~'
- else
- tilde=$HOME
- fi
-
- host=`hostname`
- user=`whoami`
-
- conf=""
- conf="${conf}[include]\n"
- conf="${conf} path = $tilde/.git-universe/gitconfig-before\n"
- conf="${conf} path = $tilde/.git-universe/host/$host.gitconfig\n"
- conf="${conf} path = $tilde/.git-universe/user/$user.gitconfig\n"
- conf="${conf} path = $tilde/.git-universe/gitconfig-after\n"
-
- echo $conf >> ~/.gitconfig
|