From: Holger Levsen Date: Sat, 9 Mar 2013 22:39:52 +0000 (+0100) Subject: script to update jenkins scripts on sagunt X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=d293cdd2d9ee0f5d098db8d4c3b5643349dd46bc;p=profitbricks%2Fjenkins-build-scripts.git script to update jenkins scripts on sagunt --- diff --git a/pb_update_jenkins b/pb_update_jenkins new file mode 100755 index 0000000..0ab8c32 --- /dev/null +++ b/pb_update_jenkins @@ -0,0 +1,25 @@ +#!/bin/bash + +# copyright 2013 Holger Levsen +# GPL2 licenced + +# this needs to be copied to /usr/local/bin (until this is packaged...) + +set -e + +WHOAMI=$(whoami 2>/dev/null) +if [ "$WHOAMI" != "jenkins" ] ; then + sudo -u jenkins -i $0 + exit 0 +fi + +id +cd +cd jenkins_build_script/develop/ +git pull origin develop +git fetch -fp +cd ../master +git pull origin master +git fetch -fp + +echo "Update successful."