aboutsummaryrefslogtreecommitdiff
path: root/bin/copymodules
diff options
context:
space:
mode:
Diffstat (limited to 'bin/copymodules')
-rwxr-xr-xbin/copymodules9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/copymodules b/bin/copymodules
index 85f7499..ab5b405 100755
--- a/bin/copymodules
+++ b/bin/copymodules
@@ -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 && cp -r $path . )
+ ( cd $PUPPET_FOLDER/modules &> /dev/null && cp -r $path . )
done