From 922da6fc08194d13e7ca4d67ecda08f180688736 Mon Sep 17 00:00:00 2001 From: Aleksander Mistewicz Date: Tue, 19 Sep 2017 11:11:44 +0200 Subject: Adjust number of preserved prerelease images Change-Id: I0447ebca5da49a625cfbe2c8b8eb83dcbb97629e --- tsp/jobs/free_diskspace.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tsp/jobs') diff --git a/tsp/jobs/free_diskspace.sh b/tsp/jobs/free_diskspace.sh index efdcd1f..b7af05b 100755 --- a/tsp/jobs/free_diskspace.sh +++ b/tsp/jobs/free_diskspace.sh @@ -17,13 +17,18 @@ # Author: Aleksander Mistewicz # Assume that most of the space is taken up by downloaded images. -# Delete ones that were modified at least 2 days ago. +# Delete ones that were modified at least MTIME+1 days ago. export TSP_DIR="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)/.." . "${TSP_DIR}/common.sh" -for i in $(find "${WS_DOWNLOAD}" -maxdepth 1 -mindepth 1 -type d -mtime +1) +MTIME="$1" + +# if argument is missing assign default value. +test -n "$MTIME" || MTIME="6" + +for i in $(find "${WS_DOWNLOAD}" -maxdepth 1 -mindepth 1 -type d -mtime "+$MTIME") do for diff_file in $(find "$i" -type f -name diff.report) do -- cgit v1.2.3