aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2012-12-18 23:13:18 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2012-12-18 23:13:18 +0000
commite183b0edd3e0798a34735cc1c9b2f4ae6a0235d6 (patch)
tree9ff3f680ad863a113917019bb37d91dbce077187 /scripts
parent79493f1f90899169fa49f1bc95c88482f9def3e7 (diff)
since the cron script is getting more complicated, stick it in svn
svn path=/trunk/; revision=16690
Diffstat (limited to 'scripts')
-rw-r--r--scripts/auto-build/run-automated-builder-cron22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/auto-build/run-automated-builder-cron b/scripts/auto-build/run-automated-builder-cron
new file mode 100644
index 00000000..bcee3224
--- /dev/null
+++ b/scripts/auto-build/run-automated-builder-cron
@@ -0,0 +1,22 @@
+#!/bin/sh
+# this is the script to actually stick in the cron job
+
+# echo each command as its executed
+set -x
+
+# the source dir where this script is
+## this could be done more easily with ${0%/*}
+SCRIPT_DIR=$(echo $0 | sed 's|\(.*\)/.*$|\1|')
+. $SCRIPT_DIR/auto-build-common
+
+SCRIPT_DIR=${HOME}/auto-build/pd-extended/scripts/auto-build
+BUILD_SCRIPT=run-automated-builder
+LOGFILE=/home/pd/logs//${DATE}_${TIME}_${SYSTEM}_${HOSTNAME}_${BUILD_SCRIPT}.txt
+
+# update the script from SVN before running it
+svn cleanup $SCRIPT_DIR > $LOGFILE 2>&1
+svn revert -R $SCRIPT_DIR > $LOGFILE 2>&1
+svn up $SCRIPT_DIR > $LOGFILE 2>&1
+
+# run the script from SVN as the 'pd' user.
+/bin/bash ${SCRIPT_DIR}/${BUILD_SCRIPT} > $LOGFILE 2>&1