summaryrefslogtreecommitdiff
path: root/bin/return-assignment
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-06-08 08:45:09 +0200
committerErich Eckner <git@eckner.net>2017-06-08 08:45:09 +0200
commitb3d55133c9ba450676249aa9641f00020300ab2b (patch)
treeb6e9d17840e8110e8b4edfb94fb3450a8e8a289f /bin/return-assignment
parent5fe5fa90fab4c60b1529ec03a9c482050981625f (diff)
downloadbuilder-b3d55133c9ba450676249aa9641f00020300ab2b.tar.xz
bin/return-assignment: remove old stage files
Diffstat (limited to 'bin/return-assignment')
-rwxr-xr-xbin/return-assignment7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/return-assignment b/bin/return-assignment
index 71a89b6..2169729 100755
--- a/bin/return-assignment
+++ b/bin/return-assignment
@@ -146,6 +146,13 @@ mv *.pkg.tar.xz{,.sig} "${master_mirror_directory}/i686/staging/"
done
)
+# remove old stage files
+ls "${work_dir}/package-states" | \
+ grep "^${1//./\\.}\(\.[^.]\+\)\{4\}\$" | \
+ grep -v "^${1//./\\.}\.$2\.$3\.$4\.[^.]\+\$" | \
+ sed "s|^|${work_dir}/package-states/|" | \
+ xargs -rn1 rm -f
+
# remove all loops which are broken by this package
grep "^${1//./\\.}\$" "${work_dir}/build-list.loops/loop_"* 2> /dev/null | \
cut -d: -f1 | \