From 674c2af06817e204c6bac95505bad48c4693317f Mon Sep 17 00:00:00 2001 From: Todd Lyons Date: Mon, 21 Oct 2013 06:33:53 -0700 Subject: [PATCH 1/1] Script to run cron and auto update client --- .gitignore | 1 + run_build.pl | 1 + run_cron.sh | 16 ++++++++++++++++ 3 files changed, 18 insertions(+) create mode 100755 run_cron.sh diff --git a/.gitignore b/.gitignore index 6351bbf..6f1a30a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ build-farm.conf +build-farm_*.conf tags run_web_txn.pl diff --git a/run_build.pl b/run_build.pl index 2374688..2383c99 100755 --- a/run_build.pl +++ b/run_build.pl @@ -1387,6 +1387,7 @@ sub get_script_config_dump orig_env => $orig_env, }; delete $conf->{secret}; + $Data::Dumper::Sortkeys = 1; return Data::Dumper->Dump([$conf],['Script_Config']); } diff --git a/run_cron.sh b/run_cron.sh new file mode 100755 index 0000000..8a6f604 --- /dev/null +++ b/run_cron.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +if which dirname >/dev/null; then + BFDIR=`dirname $0` +elif [ "x${BFDIR}" = "x" ]; then + echo "Cannot find BuildFarm client directory. Exiting." + exit 1 +fi + +cd $BFDIR +# Update the build client if new version available +if which git >/dev/null; then + git pull +fi + +./run_branches.pl $@ -- 2.30.2