From cbd6533816b1c27aab268b5c8f823345be8e12ed Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Wed, 7 May 2008 01:40:02 -0400 Subject: Properly clean up stating dirs after a success Remove all package file we added or removed Signed-off-by: Aaron Griffin --- db-update | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'db-update') 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: -- cgit v1.2.3-24-g4f1b