From b82a2ec63574c5fe0a0dd49b242d8c365155b828 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Mon, 17 Aug 2009 15:12:33 -0700 Subject: Replace DB_COMPRESSION with DBEXT in the config DBEXT contains the full extension for the db files (.db.tar.gz) and is recorded in the config file Signed-off-by: Aaron Griffin --- db-move | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'db-move') diff --git a/db-move b/db-move index 1b07091..e1a50bd 100755 --- a/db-move +++ b/db-move @@ -13,7 +13,6 @@ packagebase="$1" repofrom="$2" repoto="$3" _arch="$4" -DB_COMPRESSION='gz' export CARCH="$_arch" @@ -91,25 +90,25 @@ if [ -d "$packagebase/repos/$svnrepo_from" ]; then for architecture in $arches; do # copy the db file into our working area - if [ -f "$ftppath_from/$architecture/$repofrom.db.tar.$DB_COMPRESSION" ]; then - /bin/cp "$ftppath_from/$architecture/$repofrom.db.tar.$DB_COMPRESSION" . - /usr/bin/repo-remove -q "$repofrom.db.tar.$DB_COMPRESSION" ${pkgname[@]} || die "Error in repo-remove" + if [ -f "$ftppath_from/$architecture/$repofrom$DBEXT" ]; then + /bin/cp "$ftppath_from/$architecture/$repofrom$DBEXT" . + /usr/bin/repo-remove -q "$repofrom$DBEXT" ${pkgname[@]} || die "Error in repo-remove" #use '*' to move the old DB too - mv $repofrom.db.tar.$DB_COMPRESSION* "$ftppath_from/$architecture" + mv $repofrom$DBEXT"$ftppath_from/$architecture" echo " Package files will be cleaned up automatically" fi - if [ -f "$ftppath_to/$architecture/$repoto.db.tar.$DB_COMPRESSION" ]; then - /bin/cp "$ftppath_to/$architecture/$repoto.db.tar.$DB_COMPRESSION" . + if [ -f "$ftppath_to/$architecture/$repoto$DBEXT" ]; then + /bin/cp "$ftppath_to/$architecture/$repoto$DBEXT" . fi for i in ${pkgname[@]}; do _pkgfile="$i-$pkgver-$pkgrel-$_arch$PKGEXT" /bin/cp "$ftppath_from/$architecture/$_pkgfile" . - /usr/bin/repo-add -q "$repoto.db.tar.$DB_COMPRESSION" $_pkgfile || die "Error in repo-add $_pkgfile" + /usr/bin/repo-add -q "$repoto$DBEXT" $_pkgfile || die "Error in repo-add $_pkgfile" done #use '*' to move the old DB too - mv $repoto.db.tar.$DB_COMPRESSION* $ftppath_to/$architecture + mv $repoto$DBEXT* $ftppath_to/$architecture for i in ${pkgname[@]}; do _pkgfile="$i-$pkgver-$pkgrel-$_arch$PKGEXT" if [ "${_arch}" == "any" ]; then -- cgit v1.2.3