From 6c3fd14e110efbffab165a4100ea38e8fd17222b Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Wed, 24 Feb 2016 12:58:24 +0000 Subject: mason: Use 'find' to clean the cache Previous approach is not working anymore: # mv /srv/distbuild/!(remove) /srv/distbuild/remove -sh: syntax error: unexpected "(" Also use `find -delete` instead of `rm -r` because is faster. Change-Id: I0b500869281ce44ce565b8cca051c91961a6613d --- extensions/mason/mason-report.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'extensions') diff --git a/extensions/mason/mason-report.sh b/extensions/mason/mason-report.sh index 4368a896..f6cca0ef 100755 --- a/extensions/mason/mason-report.sh +++ b/extensions/mason/mason-report.sh @@ -293,5 +293,5 @@ mv "$logfile" "$SERVER_PATH/$BUILD_LOG" # Cleanup mkdir -p /srv/distbuild/remove -mv /srv/distbuild/!(remove) /srv/distbuild/remove -rm -r /srv/distbuild/remove +find /srv/distbuild/ -not \( -name "remove" -o -name "trees.cache.pickle" \) -mindepth 1 -maxdepth 1 -exec mv '{}' /srv/distbuild/remove \; +find /srv/distbuild/remove -delete -- cgit v1.2.1