Allow a specific branch to be checked out
This commit is contained in:
parent
3d3b9844e8
commit
45eb44b27f
1 changed files with 10 additions and 0 deletions
10
bootstrap.sh
10
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
|
||||
|
|
Loading…
Reference in a new issue