summaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
Diffstat (limited to 'files')
-rw-r--r--files/update-puppet-conf.sh12
1 files changed, 7 insertions, 5 deletions
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