summaryrefslogtreecommitdiff
path: root/puppet
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-10-24 09:24:17 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-10-24 09:24:17 -0200
commitc59d406baa0b3d00e68b1137556afb47ccde7fef (patch)
treeffd28d33882d90416af40c11c7ff91793d138fbb /puppet
parent2c61cfc7f752e8968f4de31c3fb57d61d128b94d (diff)
parent5107961a3db5fd862e1924394ba56595fd36d44f (diff)
downloaddebian-c59d406baa0b3d00e68b1137556afb47ccde7fef.tar.gz
debian-c59d406baa0b3d00e68b1137556afb47ccde7fef.tar.bz2
Merge commit '5107961a3db5fd862e1924394ba56595fd36d44f' into develop
Diffstat (limited to 'puppet')
-rwxr-xr-xpuppet/bin/copymodules30
-rwxr-xr-xpuppet/bin/symlinks12
2 files changed, 39 insertions, 3 deletions
diff --git a/puppet/bin/copymodules b/puppet/bin/copymodules
new file mode 100755
index 0000000..85f7499
--- /dev/null
+++ b/puppet/bin/copymodules
@@ -0,0 +1,30 @@
+#!/bin/bash
+#
+# Setup symlinks.
+#
+
+# Parameters
+BASENAME="`basename $0`"
+MODULES="$1"
+
+# Check parameters
+if [ -z "$MODULES" ]; then
+ echo "Usage: $BASENAME <submodules-folder>"
+ exit 1
+elif [ ! -e "$MODULES" ]; then
+ echo "Not found: $MODULES"
+fi
+
+# Add module symlinks using absolute folders
+for module in `ls $MODULES`; do
+ if [ "$module" == "bootstrap" ]; then
+ continue
+ fi
+
+ if echo "$module" | grep -q "^site_"; then
+ continue
+ fi
+
+ path="`cd $MODULES/$module && pwd`"
+ ( cd modules &> /dev/null && cp -r $path . )
+done
diff --git a/puppet/bin/symlinks b/puppet/bin/symlinks
index 0a221c4..c331261 100755
--- a/puppet/bin/symlinks
+++ b/puppet/bin/symlinks
@@ -17,8 +17,14 @@ fi
# Add module symlinks using absolute folders
for module in `ls $MODULES`; do
- if [ "$module" != "bootstrap" ]; then
- path="`cd $MODULES/$module && pwd`"
- ( cd modules &> /dev/null && ln -sf $path )
+ if [ "$module" == "bootstrap" ]; then
+ continue
fi
+
+ if echo "$module" | grep -q "^site_"; then
+ continue
+ fi
+
+ path="`cd $MODULES/$module && pwd`"
+ ( cd modules &> /dev/null && ln -sf $path )
done