From 30cb316a916a8e5c9e995fac4333416a05b7c279 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 4 Nov 2016 13:06:45 +0100 Subject: [PATCH] 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 --- phase1/expire.sh | 2 +- phase1/master.cfg | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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)) -- 2.30.2