tpoechtrager / osxcross

Mac OS X cross toolchain for Linux, FreeBSD, OpenBSD and Android (Termux)
GNU General Public License v2.0
2.8k stars 318 forks source link

fix: gen_sdk_package.sh #402

Open teocns opened 8 months ago

teocns commented 8 months ago

tools/gen_sdk_package.sh redundantly packages symlinks pointing to the same SDK, resulting in duplicates

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs $ ls -la
.
..
MacOSX.sdk
MacOSX13.3.sdk -> MacOSX.sdk
MacOSX13.sdk -> MacOSX.sdk

$ ./gen_sdk_package.sh
found Xcode: /Applications/Xcode.app
packaging MacOSX13.3 SDK (this may take several minutes) ...
packaging MacOSX13 SDK (this may take several minutes) ...

In this case MacOS13 and MacOS13.3 are symlinks that point to the same SDK. The script should be able to detect this and not package the same SDK twice.

The implemented change filters out SDK symlink entries that reference the same SDK, retaining the one with the verbose-most version (minor)