tc362/update.sh
Andrew Tomaka 170e4e4391 Add update script; works like bootstrap script
Much copy and paste and should definitely be combined with the bootstrap script.
Oh well...
2014-01-22 10:58:34 -05:00

28 lines
574 B
Bash

#!/bin/bash
# UPDATE SCRIPT - on a more clever day, I might merge this with bootstrap.sh
# 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"
exit
fi
# CLONE PUPPET REPOSITORY
cd /tmp
rm -rf puppet
git clone https://github.com/atomaka/tc362.git puppet
cd puppet
if [ "$BRANCH" != "" ]; then
git fetch
git checkout $BRANCH
fi
# INSTALL MODULES
librarian-puppet install
# RUN MANIFEST
puppet apply manifests/site.pp --modulepath=modules/