summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2013-10-18 00:32:20 -0400
committerAllan McRae <allan@archlinux.org>2013-10-31 16:20:02 +1000
commita8285350cc6c6e9400c53e2a24d984a4b242e434 (patch)
tree105a42f7f66433f4c2931403dc418cf0ce333579 /scripts
parentc2134fde2be179c490b33765fe5504be96291b95 (diff)
downloadpacman-a8285350cc6c6e9400c53e2a24d984a4b242e434.tar.xz
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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/makepkg.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 8050d0bc..ccc1ddf4 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -2248,7 +2248,7 @@ check_sanity() {
done
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")"
ret=1
fi