diff options
author | Aaron Griffin <aaronmgriffin@gmail.com> | 2008-12-01 19:03:03 -0600 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2008-12-01 19:03:03 -0600 |
commit | 87d3436dbd6fe5f3aeb7880d1596aa7a5c6e7905 (patch) | |
tree | 3cfbf1b4eeeb41547b2c936555e47213681e894e | |
parent | 1f48eaf35eecd0b35208d29d6fe6c0a8af7796df (diff) |
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-x | db-move | 13 |
1 files changed, 4 insertions, 9 deletions
@@ -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" . |