getver: tweak awk for macOS

Maybe macOS wants a space after the -v option.
master
Mike Frysinger 2021-04-24 23:42:38 -04:00
parent c6af75565a
commit 19d81dd3c7
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ HEADER="${TOPDIR}/src/gd.h"
SENTINEL="/*version605b5d1778*/"
getpart() {
awk -vfield="GD_${1}_VERSION" -vsentinel="${SENTINEL}" '
awk -v field="GD_${1}_VERSION" -v sentinel="${SENTINEL}" '
$1 == "#define" && $2 == field && $NF == sentinel {
gsub(/^"/, "", $3)
gsub(/"$/, "", $3)