summaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-06-07 22:54:24 -0300
committerSilvio Rhatto <rhatto@riseup.net>2011-06-07 22:54:24 -0300
commit07fca766c65fba9c839f3ba3a4fdec9a99ef59d0 (patch)
tree59f1f836fa88d1089ff78d41493aeac9a2146bbb /files
parent10d8c936c907fda3460d55ddd5af40f13541946d (diff)
downloadpuppet-puppet-07fca766c65fba9c839f3ba3a4fdec9a99ef59d0.tar.gz
puppet-puppet-07fca766c65fba9c839f3ba3a4fdec9a99ef59d0.tar.bz2
Updating puppet working copy just if it and it's origin exists
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