Commits

Johan Bakker committed 430efa2

changed defaults to fit in agreed folder layout

Comments (0)

Files changed (1)

bootstrap-puppet.sh

 # script : bootstrap-puppet.sh
 # Usage  : bootstrapping puppet
 # Author : Johan Bakker (jbakker@atlassian.com)
-VER=0.0.3
+VER=0.0.4
 
 usage() {
   echo "
      -y: Answers all questions with yes (this applies to installing ruby and creating folders)
      -C: Config folder (default set to SOFTWARE_ROOT/etc)
      -G: Rubygem version (defaults to 1.3.5)
-     -P: Puppet installation folder (default set to SOFTWARE_ROOT/puppet)
-     -S: Set software root folder (defaults to /sw-inf)
+     -P: Puppet installation folder (default set to SOFTWARE_ROOT/lib/puppet)
+     -S: Set software root folder (defaults to /sw)
      -W: Location to install the wrapper scripts to (default set to SOFTWARE_ROOT/bin)
   "
 }
 
 	if [ ! -x $WRAP_DIR/puppet ]; then
 	echo "#!/bin/sh
-export GEM_HOME=$SW_DIR/puppet
+export GEM_HOME=$PUP_DIR
 export RUBYLIB=$PUP_DIR/lib
 $PUP_DIR/bin/puppet \$* --confdir $CONF_DIR" > $WRAP_DIR/puppet
 	chmod +x $WRAP_DIR/puppet 
 done
 
 #vars
-SW_DIR=${SW_DIR:-"/sw-inf"}
+SW_DIR=${SW_DIR:-"/sw"}
 SW_DIR=`echo ${SW_DIR}|sed 's/\/$//'`; #Remove training slash
-PUP_DIR=${PUP_DIR:-"$SW_DIR/puppet"}
+PUP_DIR=${PUP_DIR:-"$SW_DIR/lib/puppet"}
 WRAP_DIR=${WRAP_DIR:-"$SW_DIR/bin"}
 CONF_DIR=${CONF_DIR:-"$SW_DIR/etc"}
 MANIFEST_DIR="$CONF_DIR/puppet/manifests"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.