]> gitweb.fluxo.info Git - debian.git/commitdiff
Squashed 'puppet/' changes from 59b7f11..e4ae97e
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 24 Oct 2017 11:24:17 +0000 (09:24 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 24 Oct 2017 11:24:17 +0000 (09:24 -0200)
e4ae97e Adds copymodules
de1a6dc Exclude site_ modules at bin/symlinks

git-subtree-dir: puppet
git-subtree-split: e4ae97e75dd88884340792795ccfce942a199dae

bin/copymodules [new file with mode: 0755]
bin/symlinks

diff --git a/bin/copymodules b/bin/copymodules
new file mode 100755 (executable)
index 0000000..85f7499
--- /dev/null
@@ -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
index 0a221c45c7fe2e089824f5faecbf14428b9f3453..c331261ff981ea244090022223cbcc51fef51968 100755 (executable)
@@ -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