summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2013-10-18 06:32:20 +0200
committerAllan McRae <allan@archlinux.org>2013-10-31 07:20:02 +0100
commita8285350cc6c6e9400c53e2a24d984a4b242e434 (patch)
tree105a42f7f66433f4c2931403dc418cf0ce333579 /scripts
parentc2134fde2be179c490b33765fe5504be96291b95 (diff)
downloadpacman-a8285350cc6c6e9400c53e2a24d984a4b242e434.tar.gz
pacman-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