summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2010-08-05 21:12:11 +1000
committerDan McGee <dan@archlinux.org>2010-08-23 21:50:57 -0500
commitf04530eb618a3f7e7ee1dd15f0b2907fc28bed98 (patch)
treecbb037e64ca9982d0bb6b0d138198cec485e70e7 /scripts
parent68d8bfa0b5c15e1ddbc7f81cd23bf464674413f9 (diff)
downloadpacman-f04530eb618a3f7e7ee1dd15f0b2907fc28bed98.tar.xz
makepkg: remove unnecessary variable presence check
It is unnecessary to check for a variables existence before looping over it. Extracted from patch supplied by Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in14
1 files changed, 6 insertions, 8 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index a28cfa75..7e6a194a 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1285,14 +1285,12 @@ check_sanity() {
done
fi
- if [[ -n "${PKGLIST[@]}" ]]; then
- for pkg in ${PKGLIST[@]}; do
- if ! in_array $pkg ${pkgname[@]}; then
- error "$(gettext "requested package %s is not provided in %s")" "$pkg" "$BUILDFILE"
- return 1
- fi
- done
- fi
+ for pkg in ${PKGLIST[@]}; do
+ if ! in_array $pkg ${pkgname[@]}; then
+ error "$(gettext "requested package %s is not provided in %s")" "$pkg" "$BUILDFILE"
+ return 1
+ fi
+ done
return 0
}