aboutsummaryrefslogtreecommitdiff
path: root/templates/bin
diff options
context:
space:
mode:
Diffstat (limited to 'templates/bin')
-rw-r--r--templates/bin/puppet-bootstrap10
1 files changed, 6 insertions, 4 deletions
diff --git a/templates/bin/puppet-bootstrap b/templates/bin/puppet-bootstrap
index 6c16f3f..6f93ed4 100644
--- a/templates/bin/puppet-bootstrap
+++ b/templates/bin/puppet-bootstrap
@@ -1,14 +1,12 @@
#!/bin/sh
-puppet_dir=<%= puppet_dir %>
-
function usage {
echo "Usage: $1 add-submodules"
exit $2
}
function add_submodules {
- cd $puppet_dir
+ cd $1
git init
git add .
mkdir -p ./modules
@@ -22,7 +20,11 @@ function add_submodules {
done
}
-if [[ $# -ne 1 ]]; then
+if [ $# -eq 1 ]; then
+ puppet_dir=$1
+elif [ $# -lt 1 ]; then
+ puppet_dir=<%= puppet_dir %>
+else
usage $0 1
exit 1
fi