mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-23 00:08:50 -05:00
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
@ -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%%:*}
|
||||
|
Loading…
Reference in New Issue
Block a user