aboutsummaryrefslogtreecommitdiff
path: root/bin/symlinks
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-10-27 15:07:28 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-10-27 15:07:28 -0200
commit5fc1c8b30a1bb6e31864cc0d9f4fd4e1bdb90bdf (patch)
tree34694b3c7d950666a1ef9b3b51673afbdd5c2b39 /bin/symlinks
parent779e5bd9113a76dd5bb77518c36388e96b7ff7bc (diff)
downloadpuppet-bootstrap-5fc1c8b30a1bb6e31864cc0d9f4fd4e1bdb90bdf.tar.gz
puppet-bootstrap-5fc1c8b30a1bb6e31864cc0d9f4fd4e1bdb90bdf.tar.bz2
Detect puppet folder on scripts
Diffstat (limited to 'bin/symlinks')
-rwxr-xr-xbin/symlinks9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/symlinks b/bin/symlinks
index c331261..a2f27cf 100755
--- a/bin/symlinks
+++ b/bin/symlinks
@@ -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 && ln -sf $path )
+ ( cd $PUPPET_FOLDER/modules &> /dev/null && ln -sf $path )
done