diff options
author | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2016-02-24 12:58:24 +0000 |
---|---|---|
committer | Baserock Gerrit <gerrit@baserock.org> | 2016-02-25 17:55:09 +0000 |
commit | 6c3fd14e110efbffab165a4100ea38e8fd17222b (patch) | |
tree | b2586a7ed2af75263bbaddd3139379ca98bbbddf | |
parent | 962992ddba2f3540f1507ee1c902b02f87c08c6a (diff) | |
download | definitions-6c3fd14e110efbffab165a4100ea38e8fd17222b.tar.gz |
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
-rwxr-xr-x | extensions/mason/mason-report.sh | 4 |
1 files changed, 2 insertions, 2 deletions
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 |