mirror of
https://github.com/moparisthebest/pacman
synced 2025-01-08 12:28:00 -05:00
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>
This commit is contained in:
parent
68d8bfa0b5
commit
f04530eb61
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user