From: Silvio Rhatto Date: Wed, 8 Jun 2011 01:54:24 +0000 (-0300) Subject: Updating puppet working copy just if it and it's origin exists X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=07fca766c65fba9c839f3ba3a4fdec9a99ef59d0;p=puppet-puppet.git Updating puppet working copy just if it and it's origin exists --- diff --git a/files/update-puppet-conf.sh b/files/update-puppet-conf.sh index dddae94..b299950 100644 --- a/files/update-puppet-conf.sh +++ b/files/update-puppet-conf.sh @@ -10,8 +10,10 @@ ORIGIN_DIR=/var/git/repositories/puppet.git unset GIT_DIR -cd ${PUPPET_DIR} -git pull ${ORIGIN_DIR} master -git checkout -f -git submodule update --init -git clean -d -f +if [ -d "${PUPPET_DIR}/.git" ] && [ -d "${ORIGIN_DIR}" ]; then + cd ${PUPPET_DIR} + git pull ${ORIGIN_DIR} master + git checkout -f + git submodule update --init + git clean -d -f +fi