summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois Charette <francois@archlinux.org>2009-07-21 18:43:12 -0400
committerAaron Griffin <aaronmgriffin@gmail.com>2009-07-21 18:43:12 -0400
commite4346ab8404ee32a69848d4f55bb0d09664c7d75 (patch)
tree04e6a5ef6ebfc837236946f0bbb622d31e81acb4
parentc2eecf412cb0e86ce2f41a36ed05856367d86307 (diff)
db-update: Move some steps inside an 'if'
[Aaron: keep WORKDIR creation outside the loop, as its removed at the end] Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rwxr-xr-xdb-update14
1 files changed, 8 insertions, 6 deletions
diff --git a/db-update b/db-update
index 525c21e..ade7a39 100755
--- a/db-update
+++ b/db-update
@@ -69,15 +69,17 @@ if [ -d "$stagedir" ]; then
ANYPKGS="$(/bin/ls $stagedir/*-any$PKGEXT 2>/dev/null)"
fi
-pkgtotal=$(echo "$ANYPKGS" | wc -w)
-echo "==> Processing $pkgtotal new/updated arch-independent packages for '$reponame'..." >&2
mkdir -p $WORKDIR
cd "$WORKDIR"
-svnpath="$(get_svnpath $reponame)"
-/usr/bin/svn checkout -N $svnpath checkout
-cd checkout
-to_add_any=""
+
if [ -n "$ANYPKGS" ]; then
+ pkgtotal=$(echo "$ANYPKGS" | wc -w)
+ echo "==> Processing $pkgtotal new/updated arch-independent packages for '$reponame'..." >&2
+
+ svnpath="$(get_svnpath $reponame)"
+ /usr/bin/svn checkout -N $svnpath checkout
+ cd checkout
+ to_add_any=""
for pkg in $ANYPKGS; do
_pkgfile=$(basename $pkg)
_pkgname="$(getpkgname $pkg)"