From 8f3f2d76b8feea8bcad8136d62e89db6f4ad02e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20K=C3=BCndig?= Date: Mon, 2 May 2016 11:50:55 +0200 Subject: [PATCH] Use which to get git executable --- templates/git.cron.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/templates/git.cron.sh b/templates/git.cron.sh index 120135f..20df60a 100755 --- a/templates/git.cron.sh +++ b/templates/git.cron.sh @@ -1,9 +1,10 @@ #!/usr/bin/env bash HOSTNAME=$( hostname ) +GIT=$( which git ) # Commit changes from prod server back to git if [[ -n $(git status -s) ]]; then - git add . - git commit -m "[ci skip] Added changes from $HOSTNAME" - git push origin master + $GIT add . + $GIT commit -m "[ci skip] Added changes from $HOSTNAME" + $GIT push origin master fi