From d293cdd2d9ee0f5d098db8d4c3b5643349dd46bc Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 9 Mar 2013 23:39:52 +0100 Subject: [PATCH] script to update jenkins scripts on sagunt --- pb_update_jenkins | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 pb_update_jenkins 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." -- 2.39.5