makepkg: allow empty source arrays

Necessary for metapackages.

Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Andrew Gregory 2013-10-18 00:32:20 -04:00 committed by Allan McRae
parent c2134fde2b
commit a8285350cc

View file

@ -2248,7 +2248,7 @@ check_sanity() {
done done
local idx=("${!source[@]}") local idx=("${!source[@]}")
if (( (idx[-1] + 1) != ${#source[*]} )); then if (( ${#source[*]} > 0 && (idx[-1] + 1) != ${#source[*]} )); then
error "$(gettext "Sparse arrays are not allowed for source")" error "$(gettext "Sparse arrays are not allowed for source")"
ret=1 ret=1
fi fi