Allow a specific branch to be checked out

This commit is contained in:
Andrew Tomaka 2014-01-15 15:29:46 -05:00
parent 3d3b9844e8
commit 45eb44b27f

View file

@ -1,5 +1,9 @@
#!/bin/bash #!/bin/bash
# BOOSTRAP SCRIPT
# Can take a single param to allow a specific branch to be installed
BRANCH=$1
# TO BE RUN AS ROOT # TO BE RUN AS ROOT
if [[ $(/usr/bin/id -u) -ne 0 ]]; then if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "This script must be run as root" echo "This script must be run as root"
@ -29,8 +33,14 @@ gem install librarian-puppet
# CLONE PUPPET REPOSITORY # CLONE PUPPET REPOSITORY
cd /tmp cd /tmp
rm -rf puppet
git clone https://github.com/atomaka/tc362.git puppet git clone https://github.com/atomaka/tc362.git puppet
if [ "$BRANCH" != "" ]; then
git fetch
git checkout $BRANCH
fi
# INSTALL MODULES # INSTALL MODULES
cd puppet cd puppet
librarian-puppet install librarian-puppet install