summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2008-05-07 00:28:34 +0200
committerAaron Griffin <aaronmgriffin@gmail.com>2008-05-07 00:28:34 +0200
commite259c23bb739c3129e23e053cf1c5a846c6c3e76 (patch)
treef73d6c668b59e3258a45b896d2639bc06eedfe0d
parent2d5b42fdd5ed2fa981c1122e040fd3974e79525e (diff)
downloaddbscripts-e259c23bb739c3129e23e053cf1c5a846c6c3e76.tar.gz
dbscripts-e259c23bb739c3129e23e053cf1c5a846c6c3e76.tar.xz
Fix file deletion on package removal
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rwxr-xr-xdb-update12
1 files changed, 7 insertions, 5 deletions
diff --git a/db-update b/db-update
index db96704..2dfda2a 100755
--- a/db-update
+++ b/db-update
@@ -167,14 +167,16 @@ if [ -n "$REMPKGS" ]; then
# copy the db file into our working area
[ -f "$ftppath/$reponame.db.tar.gz" ] && cp "$ftppath/$reponame.db.tar.gz" build/
- for rem in $to_rem; do
- if [ -f "build/$rem" ]; then
- /bin/rm "build/$rem"
- fi
- done
cd build/
/usr/bin/repo-remove "$reponame.db.tar.$DB_COMPRESSION" $to_rem
+
+ for rem in $to_rem; do
+ if [ -f "$ftppath/$rem" ]; then
+ /bin/rm "$ftppath/$rem"
+ /bin/rm "$rem"
+ fi
+ done
else
echo "No packages to delete"
fi