Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/db-update5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/db-update b/bin/db-update
index 45a5a61..3aced15 100755
--- a/bin/db-update
+++ b/bin/db-update
@@ -149,6 +149,11 @@ move_package() {
rm \
"${work_dir}/package-states/${package}.${from_ending}"
else
+ # remove old state files of $package with ending $to_ending
+ ls "${work_dir}/package-states" | \
+ grep "^$(str_to_regex "${package}")\(\.[^.]\+\)\{3\}\.${to_ending}\$" | \
+ sed "s|^|${work_dir}/package-states/|" | \
+ xargs -rn1 rm
mv \
"${work_dir}/package-states/${package}.${from_ending}" \
"${work_dir}/package-states/${package}.${to_ending}"