summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRémy Oudompheng <remyoudompheng@gmail.com>2011-04-02 12:31:19 +0200
committerDan McGee <dan@archlinux.org>2011-04-04 19:03:49 -0500
commit40fd8123a292ad16610367922dbdff66460bc676 (patch)
tree558e28352f35870e288551452575c3b6e143a0ee /scripts
parent37df0d4f4fb042f8fbb39525d8d338968dd912bb (diff)
downloadpacman-40fd8123a292ad16610367922dbdff66460bc676.tar.xz
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>
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 b55ac427..1c8c50e8 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -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%%:*}