tpoechtrager / osxcross

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

fix: gen_sdk_package.sh #402

Open teocns opened 1 year ago

teocns commented 1 year 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)