X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=setup.sh;h=bab4ce22762cde37db3623fcb63ce4b9277f1eac;hb=917248b29e9f635f27a533034f655cc110e2cca7;hp=c61c00dcdfbc8d97f4fc16c08a860bc6a60ff532;hpb=469dfb554f9ee2f50c6df74372342abe8a229c0c;p=config%2Fdotfiles.git diff --git a/setup.sh b/setup.sh index c61c00d..bab4ce2 100755 --- a/setup.sh +++ b/setup.sh @@ -22,17 +22,21 @@ set -e . ../lib.sh + if installed git; then + generate gitconfig .in simple_cpp \ + PWD -- "`pwd`" + + # Older Git versions don't support push.default = simple. + if ! git status >/dev/null 2>&1; then + echo 'gitconfig: removing push.default = simple' + grep_i -v '^[[:space:]]default = simple$' gitconfig + fi # Older Git versions don't support --patience. - PATIENCE= - if git diff --patience >/dev/null 2>&1; then - PATIENCE=--patience + if ! git diff --patience >/dev/null 2>&1; then + sed_i 's/--patience//' gitconfig fi - generate m4 gitconfig \ - -DPATIENCE="$PATIENCE" \ - -DOS=`os` \ - -DPWD="`pwd`" link gitconfig ~/.gitconfig fi @@ -41,8 +45,6 @@ if installed tig; then fi if installed hg; then - generate m4 hgrc \ - -DOS=`os` link hgrc ~/.hgrc fi