X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=setup.sh;h=bab4ce22762cde37db3623fcb63ce4b9277f1eac;hb=917248b29e9f635f27a533034f655cc110e2cca7;hp=23c1f8ea860a2e78e0212fb839c6e32b2a16f5aa;hpb=d7057bf97274c3961a4e160177384ad2a227f893;p=config%2Fdotfiles.git diff --git a/setup.sh b/setup.sh index 23c1f8e..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` \ - -DTIG="`pwd`/tig.pl" 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