diff options
author | Francois Charette <francois@archlinux.org> | 2009-07-22 00:43:12 +0200 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2009-07-22 00:43:12 +0200 |
commit | e4346ab8404ee32a69848d4f55bb0d09664c7d75 (patch) | |
tree | 04e6a5ef6ebfc837236946f0bbb622d31e81acb4 | |
parent | c2eecf412cb0e86ce2f41a36ed05856367d86307 (diff) | |
download | dbscripts-e4346ab8404ee32a69848d4f55bb0d09664c7d75.tar.gz dbscripts-e4346ab8404ee32a69848d4f55bb0d09664c7d75.tar.xz |
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-x | db-update | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -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)" |