From 799f330f6de8ff65a7bdf7e0d1b12cd3c10981ba Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Sat, 30 May 2020 06:35:27 -0400 Subject: osxvers: use swvers -productVersion to skip one awk call Fixes #406. Suggested by nms42. --- bin/osxvers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/osxvers') diff --git a/bin/osxvers b/bin/osxvers index 4af44da2..6ebeb11f 100755 --- a/bin/osxvers +++ b/bin/osxvers @@ -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 -- cgit v1.2.3