From d08eb7656fb6c4e49aa2e167ed1158ee73a62692 Mon Sep 17 00:00:00 2001 From: "Philipp A. Hartmann" Date: Sun, 13 Jul 2014 12:10:42 +0200 Subject: [PATCH] travis-doxygen.sh: only overwrite .git-credentials, iff not exists --- build/travis-doxygen.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/travis-doxygen.sh b/build/travis-doxygen.sh index 74fa52838..5c4d4a1d2 100755 --- a/build/travis-doxygen.sh +++ b/build/travis-doxygen.sh @@ -107,9 +107,9 @@ gh_pages_push() { git remote set-url --push origin "${GITHUB_URL}" git config credential.helper 'store' # ( set +x ; git config credential.username "${GH_TOKEN}" ) - ( set +x ; \ - echo "https://${GH_TOKEN}:@${GITHUB_HOST}" > ${HOME}/.git-credentials ; \ - chmod go-rw ${HOME}/.git-credentials ) + ( set +x ; [ -f ${HOME}/.git-credentials ] || \ + ( echo "https://${GH_TOKEN}:@${GITHUB_HOST}" > ${HOME}/.git-credentials ; \ + chmod go-rw ${HOME}/.git-credentials ) ) # push to GitHub git push origin gh-pages }