From 45eb44b27f026a8204a10e157daf3f2d084be998 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 15 Jan 2014 15:29:46 -0500 Subject: [PATCH] Allow a specific branch to be checked out --- bootstrap.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bootstrap.sh b/bootstrap.sh index 71fe15d..5be7f24 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -1,5 +1,9 @@ #!/bin/bash +# BOOSTRAP SCRIPT +# Can take a single param to allow a specific branch to be installed +BRANCH=$1 + # TO BE RUN AS ROOT if [[ $(/usr/bin/id -u) -ne 0 ]]; then echo "This script must be run as root" @@ -29,8 +33,14 @@ gem install librarian-puppet # CLONE PUPPET REPOSITORY cd /tmp +rm -rf puppet git clone https://github.com/atomaka/tc362.git puppet +if [ "$BRANCH" != "" ]; then + git fetch + git checkout $BRANCH +fi + # INSTALL MODULES cd puppet librarian-puppet install