summaryrefslogtreecommitdiffstats
path: root/db-move
diff options
context:
space:
mode:
Diffstat (limited to 'db-move')
-rwxr-xr-xdb-move15
1 files changed, 5 insertions, 10 deletions
diff --git a/db-move b/db-move
index 0e0587c..ff9677b 100755
--- a/db-move
+++ b/db-move
@@ -84,23 +84,18 @@ if [ -d "$packagename/repos/$svnrepo_from" ]; then
# copy the db file into our working area
if [ -f "$ftppath_from/$repofrom.db.tar.$DB_COMPRESSION" ]; then
/bin/cp "$ftppath_from/$repofrom.db.tar.$DB_COMPRESSION" .
- else
- touch "$repofrom.db.tar.$DB_COMPRESSION"
+ /usr/bin/repo-remove -q "$repofrom.db.tar.$DB_COMPRESSION" $packagename || die "Error in repo-remove"
+ #use '*' to move the old DB too
+ mv $repofrom.db.tar.$DB_COMPRESSION* $ftppath_from
+ echo " Package files will be cleaned up automatically"
fi
- /usr/bin/repo-remove "$repofrom.db.tar.$DB_COMPRESSION" $packagename || die "Error in repo-remove"
- #use '*' to move the old DB too
- mv $repofrom.db.tar.$DB_COMPRESSION* $ftppath_from
- echo " Package files will be cleaned up automatically"
-
if [ -f "$ftppath_to/$repoto.db.tar.$DB_COMPRESSION" ]; then
/bin/cp "$ftppath_to/$repoto.db.tar.$DB_COMPRESSION" .
- else
- touch "$repoto.db.tar.$DB_COMPRESSION"
fi
/bin/cp "$ftppath_from/$_pkgfile" .
- /usr/bin/repo-add "$repoto.db.tar.$DB_COMPRESSION" $_pkgfile || die "Error in repo-add"
+ /usr/bin/repo-add -q "$repoto.db.tar.$DB_COMPRESSION" $_pkgfile || die "Error in repo-add"
#use '*' to move the old DB too
mv $repoto.db.tar.$DB_COMPRESSION* $_pkgfile $ftppath_to
else