summaryrefslogtreecommitdiff
path: root/db-update
diff options
context:
space:
mode:
Diffstat (limited to 'db-update')
-rwxr-xr-xdb-update15
1 files changed, 9 insertions, 6 deletions
diff --git a/db-update b/db-update
index 42f5430..77af39f 100755
--- a/db-update
+++ b/db-update
@@ -71,6 +71,11 @@ 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/
+fi
+
echo "Updating DB for $reponame $_arch"
if [ -d "${stagedir}64" ]; then
@@ -90,9 +95,7 @@ if [ -d "${stagedir}/add" ]; then
echo "Please delete staging/<reponame>/{add,del}"
echo " and ensure you are using the newest devtools"
echo "--------------------------------------------------"
- if [ -e "${stagedir}/add/"* ]; then
- /bin/mv "${stagedir}/add/"* "$stagedir/"
- fi
+ /bin/mv "${stagedir}/add/"* "$stagedir/"
fi
to_add=""
@@ -145,7 +148,7 @@ if [ -n "$ADDPKGS" ]; then
pkgs=""
for pkg in $to_add; do pkgs="$pkgs $(basename $pkg)"; done
- /usr/bin/repo-add "$reponame.db.tar.$DB_COMPRESSION" $pkgs
+ /usr/bin/repo-add -q "$reponame.db.tar.$DB_COMPRESSION" $pkgs
else
rm -f "build/$reponame.db.tar.$DB_COMPRESSION"
echo "Errors found when adding packages"
@@ -167,9 +170,9 @@ else
echo "Nothing to copy, no work done"
fi
-if [ -n "$ADDPKGS" ]; then
+if [ -n "$to_add" ]; then
echo "Cleaning staging dir"
- /bin/rm $ADDPKGS
+ /bin/rm $to_add
fi
cleanup