summaryrefslogtreecommitdiff
path: root/db-move
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2009-08-17 15:12:33 -0700
committerAaron Griffin <aaronmgriffin@gmail.com>2009-08-17 15:12:33 -0700
commitb82a2ec63574c5fe0a0dd49b242d8c365155b828 (patch)
tree7ecb2c98ecb1213dde5101e421554dcf029b84b6 /db-move
parent1d94c827c8e9efe6e56bc15f993a1ce3764a675a (diff)
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 <aaronmgriffin@gmail.com>
Diffstat (limited to 'db-move')
-rwxr-xr-xdb-move17
1 files changed, 8 insertions, 9 deletions
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