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:
parent
37df0d4f4f
commit
40fd8123a2
1 changed files with 1 additions and 1 deletions
|
@ -1275,7 +1275,7 @@ check_sanity() {
|
||||||
done
|
done
|
||||||
|
|
||||||
local optdepends_list=()
|
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/\\$//')
|
sed -e "s/optdepends=/optdepends_list+=/" -e "s/#.*//" -e 's/\\$//')
|
||||||
for i in "${optdepends_list[@]}"; do
|
for i in "${optdepends_list[@]}"; do
|
||||||
local pkg=${i%%:*}
|
local pkg=${i%%:*}
|
||||||
|
|
Loading…
Add table
Reference in a new issue