summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2008-12-02 02:03:03 +0100
committerAaron Griffin <aaronmgriffin@gmail.com>2008-12-02 02:03:03 +0100
commit87d3436dbd6fe5f3aeb7880d1596aa7a5c6e7905 (patch)
tree3cfbf1b4eeeb41547b2c936555e47213681e894e
parent1f48eaf35eecd0b35208d29d6fe6c0a8af7796df (diff)
downloaddbscripts-87d3436dbd6fe5f3aeb7880d1596aa7a5c6e7905.tar.gz
dbscripts-87d3436dbd6fe5f3aeb7880d1596aa7a5c6e7905.tar.xz
Cleanup missing db file logic
Do not touch missing db files. Additionally, no need to call db-remove if the db file doesn't exist Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rwxr-xr-xdb-move13
1 files changed, 4 insertions, 9 deletions
diff --git a/db-move b/db-move
index 0e0587c..7fab215 100755
--- a/db-move
+++ b/db-move
@@ -84,19 +84,14 @@ 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 "$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" .