Skip to content

Commit 9d43f97

Browse files
Merge pull request #291 from andrewwhitehead/fix/darwin-build
Fix check for macos major version
2 parents b71ce5c + 6bff7dc commit 9d43f97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build-universal.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
# NOTE:
4-
# MacOS universal build currently requires MacOS 11 (Big Sur) for the appropriate SDK,
4+
# MacOS universal build currently requires MacOS 11+ (Big Sur) for the appropriate SDK,
55
# and `sudo xcode-select --install` must be run to install the command line utilities.
66
# Rust's `beta` channel must be installed because aarch64 is still a tier-2 target:
77
# `rustup toolchain install beta`.
@@ -41,7 +41,7 @@ for target in $MACOS_UNIVERSAL_TARGETS; do
4141
fi
4242
done
4343

44-
MAJOR_VER=`sw_vers | grep ProductVersion | cut -f 2 | cut -f 1 -d .`
44+
MAJOR_VER=`sw_vers -productVersion | cut -f 1 -d .`
4545
if [ "$MAJOR_VER" -lt 11 ]; then
4646
echo "MacOS universal build requires OS 11 (Big Sur) or newer"
4747
TARGET=

0 commit comments

Comments
 (0)