2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 09:57:41 +00:00

mkpkg: handle a macOS SDK that just uses the major version.

For example, MacOSX11.sdk instead of MacOSX11.3.sdk.
This commit is contained in:
Todd C. Miller 2021-11-18 15:40:36 -07:00
parent 70c0d35faa
commit 0a89b87a3f

View File

@ -347,7 +347,7 @@ case "$osversion" in
;; ;;
esac esac
if test "${osversion}" != "`$scriptdir/pp --probe`"; then if test "${osversion}" != "`$scriptdir/pp --probe`"; then
sdkvers=`echo "${osversion}" | sed 's/^macos\([0-9][0-9]\)\([0-9]*\)-.*$/\1.\2/'` sdkvers=`echo "${osversion}" | sed -e 's/^macos\([0-9][0-9]\)\([0-9]*\)-.*$/\1.\2/' -e 's/\.$//'`
# SDKs may be under Xcode.app or CommandLineTools (for non-Xcode) # SDKs may be under Xcode.app or CommandLineTools (for non-Xcode)
if [ -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs" ]; then if [ -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs" ]; then
SDK_DIR="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs" SDK_DIR="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs"