From 0667e96e7ebd7a99e79c55309d1661a6824d6511 Mon Sep 17 00:00:00 2001 From: Teo Date: Thu, 2 Nov 2023 16:06:28 -0600 Subject: [PATCH] fix: gen_sdk_package.sh Filter out SDK symlink entries that reference the same SDK, retaining the most verbose version name --- tools/gen_sdk_package.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/gen_sdk_package.sh b/tools/gen_sdk_package.sh index f29faec40..72d94f660 100755 --- a/tools/gen_sdk_package.sh +++ b/tools/gen_sdk_package.sh @@ -191,8 +191,11 @@ else fi -SDKS=$(ls | grep -E "^MacOSX14.*|^MacOSX13.*|^MacOSX12.*|^MacOSX11.*|^MacOSX10.*" | grep -v "Patch") +SDKS=$(for sdk in $(ls | grep -E "^MacOSX14.*|^MacOSX13.*|^MacOSX12.*|^MacOSX11.*|^MacOSX10.*" | grep -v "Patch"); do + [ -e "$sdk" ] || continue; # Skip if the file doesn't exist + echo "$(rreadlink "$sdk") $sdk"; +done | awk '!seen[$1]++' | awk '{print $2}') if [ -z "$SDKS" ]; then echo "No SDK found" 1>&2 exit 1