makepkg: fix a GNU-ism in awk usage

A non-GNU version of awk may not support the (|...) syntax for
an optional group and require '()' to match an empty string.
The (...)? syntax is more appropriate for this usage.

Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Rémy Oudompheng 2011-04-02 12:31:19 +02:00 committed by Dan McGee
parent 37df0d4f4f
commit 40fd8123a2
1 changed files with 1 additions and 1 deletions

View File

@ -1275,7 +1275,7 @@ check_sanity() {
done
local optdepends_list=()
eval $(awk '/^[[:space:]]*optdepends=\(/,/\)[[:space:]]*(|#.*)$/' "$BUILDFILE" | \
eval $(awk '/^[[:space:]]*optdepends=\(/,/\)[[:space:]]*(#.*)?$/' "$BUILDFILE" | \
sed -e "s/optdepends=/optdepends_list+=/" -e "s/#.*//" -e 's/\\$//')
for i in "${optdepends_list[@]}"; do
local pkg=${i%%:*}