summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2008-05-07 01:40:02 -0400
committerAaron Griffin <aaronmgriffin@gmail.com>2008-05-07 01:40:02 -0400
commitcbd6533816b1c27aab268b5c8f823345be8e12ed (patch)
tree49821e3cda85d05789f51fa1a0bc13833545ce60
parent0cb6e7ab0840196c8b9c0dda64e50fa535b17707 (diff)
Properly clean up stating dirs after a success
Remove all package file we added or removed Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rwxr-xr-xdb-update6
1 files changed, 5 insertions, 1 deletions
diff --git a/db-update b/db-update
index 5d492fd..451d206 100755
--- a/db-update
+++ b/db-update
@@ -186,7 +186,6 @@ if [ -n "$REMPKGS" ]; then
for rem in $to_rem; do
if [ -f "$ftppath/$rem" ]; then
/bin/rm "$ftppath/$rem"
- /bin/rm "$rem"
fi
done
else
@@ -200,9 +199,14 @@ fi
if [ $(/bin/ls "$WORKDIR/build/" 2>/dev/null | wc -l) != 0 ]; then
echo "Copying new files to '$ftppath'"
/bin/cp -r "$WORKDIR/build/"* "$ftppath"
+ echo "Cleaning staging dir"
+ echo "/bin/rm $to_add $to_rem"
+ /bin/rm $to_add $to_rem
else
echo "Nothing to copy, no work done"
fi
+
+
cleanup
# vim: set ts=4 sw=4 noet ft=sh: