From 5107961a3db5fd862e1924394ba56595fd36d44f Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 24 Oct 2017 09:24:17 -0200 Subject: Squashed 'puppet/' changes from 59b7f11..e4ae97e e4ae97e Adds copymodules de1a6dc Exclude site_ modules at bin/symlinks git-subtree-dir: puppet git-subtree-split: e4ae97e75dd88884340792795ccfce942a199dae --- bin/copymodules | 30 ++++++++++++++++++++++++++++++ bin/symlinks | 12 +++++++++--- 2 files changed, 39 insertions(+), 3 deletions(-) create mode 100755 bin/copymodules diff --git a/bin/copymodules b/bin/copymodules new file mode 100755 index 0000000..85f7499 --- /dev/null +++ b/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 " + 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/bin/symlinks b/bin/symlinks index 0a221c4..c331261 100755 --- a/bin/symlinks +++ b/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 -- cgit v1.2.3