Last active
October 30, 2024 16:11
-
-
Save bodja/12e0f6672f98cae7dcb4c84927d4985f to your computer and use it in GitHub Desktop.
Download MacOSX SDK version and change minimum sdk version in info.plist
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SDK_VERSION=$1 | |
SDK_NAME="MacOSX${SDK_VERSION}.sdk" | |
TAR_FILE_NAME="${SDK_NAME}.tar.xz" | |
DOWNLOAD_URL="https://github.com/phracker/MacOSX-SDKs/releases/download/MacOSX10.11.sdk/${TAR_FILE_NAME}" | |
TAR_FILE_DEST="/tmp/${TAR_FILE_NAME}" | |
SDK_MIN_VERSION_FILE="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Info.plist" | |
SDK_DIR="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/" | |
echo Downloading $SDK_NAME | |
curl -L $DOWNLOAD_URL -o $TAR_FILE_DEST --progress-bar | |
echo Extracting $SDK_NAME to $SDK_DIR | |
sudo tar -zxf $TAR_FILE_DEST -C $SDK_DIR | |
rm -rf $TAR_FILE_DEST | |
echo Changing "MinimumSDKVersion" to $SDK_VERSION | |
sudo cp -n $SDK_MIN_VERSION_FILE ${SDK_MIN_VERSION_FILE}.bak | |
sudo plutil -replace MinimumSDKVersion -string $SDK_VERSION $SDK_MIN_VERSION_FILE | |
echo Done. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment