diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-10-27 15:07:28 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-10-27 15:07:28 -0200 |
commit | 5fc1c8b30a1bb6e31864cc0d9f4fd4e1bdb90bdf (patch) | |
tree | 34694b3c7d950666a1ef9b3b51673afbdd5c2b39 /bin/copymodules | |
parent | 779e5bd9113a76dd5bb77518c36388e96b7ff7bc (diff) | |
download | puppet-bootstrap-5fc1c8b30a1bb6e31864cc0d9f4fd4e1bdb90bdf.tar.gz puppet-bootstrap-5fc1c8b30a1bb6e31864cc0d9f4fd4e1bdb90bdf.tar.bz2 |
Detect puppet folder on scripts
Diffstat (limited to 'bin/copymodules')
-rwxr-xr-x | bin/copymodules | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/copymodules b/bin/copymodules index 85f7499..ab5b405 100755 --- a/bin/copymodules +++ b/bin/copymodules @@ -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 && cp -r $path . ) + ( cd $PUPPET_FOLDER/modules &> /dev/null && cp -r $path . ) done |