summaryrefslogtreecommitdiff
path: root/db-update
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2009-01-14 16:37:23 -0500
committerAaron Griffin <aaronmgriffin@gmail.com>2009-01-14 16:37:23 -0500
commit6e0ea2deb4f28baeebef2c549c30daee60f8e8d7 (patch)
tree9435980a4ad6367b8118eaedac330b306d788741 /db-update
parent3fb6203f79434d48954f6ef3c5be7067beaccd86 (diff)
parent5f64e9993a494040b0280ed0f1daa38f68f9c46b (diff)
Merge branch 'master' of file:///srv/projects/git/dbscripts
Conflicts: db-update Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
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