osxvers: use swvers -productVersion to skip one awk call

Fixes #406. Suggested by nms42.
This commit is contained in:
Russ Cox 2020-05-30 06:35:27 -04:00
parent 01b5056135
commit 799f330f6d

View file

@ -3,5 +3,5 @@
u=`uname`
case "$u" in
Darwin)
sw_vers | awk '$1 == "ProductVersion:" {print $2}' | awk -F. '{printf("CFLAGS=$CFLAGS -DOSX_VERSION=%d%02d%02d\n", $1, $2, $3)}'
sw_vers -productVersion | awk -F. '{printf("CFLAGS=$CFLAGS -DOSX_VERSION=%d%02d%02d\n", $1, $2, $3)}'
esac