From 57df5705d41dffbf580378018e236fb0567970fd Mon Sep 17 00:00:00 2001 From: GenZmeY Date: Mon, 24 Jan 2022 05:26:49 +0300 Subject: [PATCH] add brew cleanup --- builder | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/builder b/builder index 2a2fbfd..10d5e1e 100644 --- a/builder +++ b/builder @@ -300,6 +300,19 @@ function brewed () done } +function brew_cleanup () +{ + for Package in $PackageBuildOrder + do + if ! echo "$PackageUpload" | grep -Pq "(^|\s+)$Package(\s+|$)"; then + find "$KFPublishBrewedPC" -type f -name "$Package.u" -delete + find "$MutSource/$Package" -type f -name '*.upk' -printf "%f\n" | xargs -I{} find "$KFPublishBrewedPC" -type f -name {} -delete + fi + done + rm -f "$KFPublishBrewedPC"/*.tmp + find "$KFPublishBrewedPC" -type d -empty -delete +} + function brew () { local PID="" @@ -324,8 +337,7 @@ function brew () done publish_common - - rm -f "$KFPublishBrewedPC"/*.tmp # cleanup + brew_cleanup } function brew_manual ()