From: Jo-Philipp Wich Date: Fri, 4 Nov 2016 12:06:45 +0000 (+0100) Subject: phase1: fix issues in previous commit X-Git-Tag: v1~244 X-Git-Url: http://git.openwrt.org/?p=buildbot.git;a=commitdiff_plain;h=30cb316a916a8e5c9e995fac4333416a05b7c279 phase1: fix issues in previous commit - Fix syntax error in expire.sh script - Download expire.sh into parent directory - Ensure that lifetime argument is passed as string when invoking expire.sh Signed-off-by: Jo-Philipp Wich --- diff --git a/phase1/expire.sh b/phase1/expire.sh index eeba668..2313d19 100755 --- a/phase1/expire.sh +++ b/phase1/expire.sh @@ -10,7 +10,7 @@ if [ $max_lifetime -le 0 ]; then elif [ $tree_age -ge $max_lifetime ]; then echo "The build tree reached its maximum lifetime, cleaning up." - find . -mindepth 1 -maxdepth 1 -print0 | xargs -r -0 rm -vrf | while read entry do + find . -mindepth 1 -maxdepth 1 -print0 | xargs -r -0 rm -vrf | while read entry; do printf "." done diff --git a/phase1/master.cfg b/phase1/master.cfg index 1389ae5..099f666 100644 --- a/phase1/master.cfg +++ b/phase1/master.cfg @@ -279,13 +279,13 @@ for target in targets: if tree_expire > 0: factory.addStep(FileDownload( mastersrc = "expire.sh", - slavedest = "expire.sh", + slavedest = "../expire.sh", mode = 0755)) factory.addStep(ShellCommand( name = "expire", description = "Checking for build tree expiry", - command = ["./expire.sh", tree_expire], + command = ["./expire.sh", str(tree_expire)], workdir = ".", haltOnFailure = True, timeout = 2400))