From c212514035cffd38acbfac1413064937b28685b6 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 1 Oct 2020 15:02:47 -0300 Subject: Squashed 'puppet/' content from commit eb5ecc4 git-subtree-dir: puppet git-subtree-split: eb5ecc4fcad6bd4f75e38683ae12a8dba4382c0b --- bin/copymodules | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 bin/copymodules (limited to 'bin/copymodules') diff --git a/bin/copymodules b/bin/copymodules new file mode 100755 index 0000000..ab5b405 --- /dev/null +++ b/bin/copymodules @@ -0,0 +1,37 @@ +#!/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 + +# 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 + continue + fi + + if echo "$module" | grep -q "^site_"; then + continue + fi + + path="`cd $MODULES/$module && pwd`" + ( cd $PUPPET_FOLDER/modules &> /dev/null && cp -r $path . ) +done -- cgit v1.2.3