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-update | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'db-update') diff --git a/db-update b/db-update index 8e7a0c7..05236fe 100755 --- a/db-update +++ b/db-update @@ -11,7 +11,6 @@ source_makepkg reponame="$1" current_arch="" -DB_COMPRESSION='gz' [ "$UID" = "" ] && UID=$(uid) @@ -125,8 +124,8 @@ for current_arch in ${ARCHES[@]}; do cd "$WORKDIR" # copy the db file into our working area - if [ -f "$ftppath/$reponame.db.tar.$DB_COMPRESSION" ]; then - /bin/cp "$ftppath/$reponame.db.tar.$DB_COMPRESSION" build/ + if [ -f "$ftppath/$reponame$DBEXT" ]; then + /bin/cp "$ftppath/$reponame$DBEXT" build/ fi echo "Updating DB for $svnrepo" @@ -139,8 +138,8 @@ for current_arch in ${ARCHES[@]}; do if [ -n "$ADDPKGS" -o -n "$ANYPKGS" ]; then echo "==> Copying DB file from '$reponame'..." >&2 - if [ -f "$ftppath/$reponame.db.tar.$DB_COMPRESSION" ]; then - /bin/cp "$ftppath/$reponame.db.tar.$DB_COMPRESSION" build/ + if [ -f "$ftppath/$reponame$DBEXT" ]; then + /bin/cp "$ftppath/$reponame$DBEXT" build/ fi pkgtotal=$(echo "$ADDPKGS $ANYPKGS" | wc -w) @@ -183,9 +182,9 @@ for current_arch in ${ARCHES[@]}; do pkgs="" for pkg in $to_add $to_add_any; do pkgs="$pkgs $(basename $pkg)"; done - /usr/bin/repo-add -q "$reponame.db.tar.$DB_COMPRESSION" $pkgs + /usr/bin/repo-add -q "$reponame$DBEXT" $pkgs else - rm -f "build/$reponame.db.tar.$DB_COMPRESSION" + rm -f "build/$reponame$DBEXT" echo "Errors found when adding packages" fi else -- cgit v1.2.3-24-g4f1b