aboutsummaryrefslogtreecommitdiff
path: root/bin/syncmodules
diff options
context:
space:
mode:
Diffstat (limited to 'bin/syncmodules')
-rwxr-xr-xbin/syncmodules9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/syncmodules b/bin/syncmodules
index 1f5dd07..1585aa4 100755
--- a/bin/syncmodules
+++ b/bin/syncmodules
@@ -15,6 +15,13 @@ elif [ ! -e "$MODULES" ]; then
echo "Not found: $MODULES"
fi
+# Set puppet folder
+if [ -d "puppet" ]; then
+ PUPPET_FOLDER="puppet"
+else
+ PUPPET_FOLDER="."
+fi
+
# Add module symlinks using absolute folders
for module in `ls $MODULES`; do
if [ "$module" == "bootstrap" ]; then
@@ -26,5 +33,5 @@ for module in `ls $MODULES`; do
fi
path="`cd $MODULES/$module && pwd`"
- ( cd modules &> /dev/null && rsync -av --delete $path/ $module/ )
+ ( cd $PUPPET_FOLDER/modules &> /dev/null && rsync -av --delete $path/ $module/ )
done