summaryrefslogtreecommitdiffstats
path: root/db-update
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2008-11-23 09:22:15 +0100
committerAaron Griffin <aaronmgriffin@gmail.com>2008-11-23 09:22:15 +0100
commit3fb6203f79434d48954f6ef3c5be7067beaccd86 (patch)
tree25bdf969f3f43bb204ddf26e3e79433adee4c19b /db-update
parent252e11f0e5a4eba7859108e0fb4bb3593819276f (diff)
downloaddbscripts-3fb6203f79434d48954f6ef3c5be7067beaccd86.tar.gz
dbscripts-3fb6203f79434d48954f6ef3c5be7067beaccd86.tar.xz
Only copy DB file from repo if we have pkgs
We were copying our DB file from the repo to our temp build dir all the time. We should only do this if there are packages to add Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'db-update')
-rwxr-xr-xdb-update15
1 files changed, 8 insertions, 7 deletions
diff --git a/db-update b/db-update
index 1d2efa2..42f5430 100755
--- a/db-update
+++ b/db-update
@@ -71,13 +71,6 @@ repo_lock $reponame $_arch
/bin/mkdir -p "$WORKDIR/build"
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/
-else
- touch "build/$reponame.db.tar.$DB_COMPRESSION"
-fi
-
echo "Updating DB for $reponame $_arch"
if [ -d "${stagedir}64" ]; then
@@ -108,6 +101,14 @@ if [ -d "$stagedir" ]; then
fi
if [ -n "$ADDPKGS" ]; 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/
+ else
+ touch "build/$reponame.db.tar.$DB_COMPRESSION"
+ fi
+
echo "==> Processing new/updated packages for repository '$reponame'..." >&2
cd "$WORKDIR"