summaryrefslogtreecommitdiffstats
path: root/db-update
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2009-08-18 00:12:33 +0200
committerAaron Griffin <aaronmgriffin@gmail.com>2009-08-18 00:12:33 +0200
commitb82a2ec63574c5fe0a0dd49b242d8c365155b828 (patch)
tree7ecb2c98ecb1213dde5101e421554dcf029b84b6 /db-update
parent1d94c827c8e9efe6e56bc15f993a1ce3764a675a (diff)
downloaddbscripts-b82a2ec63574c5fe0a0dd49b242d8c365155b828.tar.gz
dbscripts-b82a2ec63574c5fe0a0dd49b242d8c365155b828.tar.xz
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-update')
-rwxr-xr-xdb-update13
1 files changed, 6 insertions, 7 deletions
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