X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=setup.sh;h=bab4ce22762cde37db3623fcb63ce4b9277f1eac;hb=917248b29e9f635f27a533034f655cc110e2cca7;hp=2747b9235d4533990ea361ae4a4c8c5d08e99ac2;hpb=e4c16ff97afe69adec52cbbf4b4d66455d4a3371;p=config%2Fdotfiles.git diff --git a/setup.sh b/setup.sh index 2747b92..bab4ce2 100755 --- a/setup.sh +++ b/setup.sh @@ -18,20 +18,25 @@ # along with this program. If not, see . +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 \ - -DGITIGNORE=`pwd`/gitignore \ - -DPATIENCE="$PATIENCE" \ - -DOS=`os` \ - -DTIG="`pwd`/tig.pl" link gitconfig ~/.gitconfig fi @@ -40,9 +45,6 @@ if installed tig; then fi if installed hg; then - generate m4 hgrc \ - -DHGIGNORE=`pwd`/hgignore \ - -DOS=`os` link hgrc ~/.hgrc fi