summaryrefslogtreecommitdiff
path: root/db-update
diff options
context:
space:
mode:
authorFrancois Charette <francois@archlinux.org>2009-07-20 09:47:08 -0700
committerAaron Griffin <aaronmgriffin@gmail.com>2009-07-20 09:47:08 -0700
commitce9a9b1951cefbdf6b2df93b07eb9120295bec7a (patch)
treecad2922e67e348fef08d3e88c156eee6e1328aff /db-update
parente53a4351d72d2a175d5342b71c1f19304840cd8e (diff)
Minor syntactic improvements in db-update
* also added error msg for repo_lock in db-functions [Aaron: keep quotes around $WORKDIR] Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'db-update')
-rwxr-xr-xdb-update7
1 files changed, 3 insertions, 4 deletions
diff --git a/db-update b/db-update
index b530987..9d9f7eb 100755
--- a/db-update
+++ b/db-update
@@ -104,8 +104,7 @@ if [ -n "$ANYPKGS" ]; then
done
fi
-for A in ${ARCHES[@]}; do
- current_arch="$A"
+for current_arch in ${ARCHES[@]}; do
ftppath="$FTP_BASE/$reponame/os/$current_arch/"
ftppath_any="$FTP_BASE/$reponame/os/any/"
@@ -195,8 +194,8 @@ for A in ${ARCHES[@]}; do
# if non empty, move all build dirs
if [ $(/bin/ls "$WORKDIR/build/" 2>/dev/null | wc -l) != 0 ]; then
- echo "Copying new files to '$ftppath'"
if [ $(/bin/ls "$WORKDIR/build/"*-$current_arch$PKGEXT 2>/dev/null | wc -l) != 0 ]; then
+ echo "Copying new files to '$ftppath'"
for f in "$WORKDIR/build/"*-$current_arch$PKGEXT; do
if ! /bin/cp "$f" "$ftppath"; then
die "error: failure while copying files to $ftppath"
@@ -216,7 +215,7 @@ for A in ${ARCHES[@]}; do
done
fi
if ! /bin/cp "$WORKDIR/build/$reponame.db"* "$ftppath/"; then
- die "failed to move repository $reponame-$A".
+ die "failed to move repository $reponame-$current_arch".
fi
else
echo "Nothing to copy, no work done"