gen_sdk_package.sh: Use a more general pattern for finding the SDKs

so the script has some hope of working when macOS is released.
Also make it show an error message if no SDKs are found instead of
just stopping.
This commit is contained in:
David (Pololu) 2022-06-05 14:17:12 -07:00
parent 610542781e
commit 2752b1c9e2

View File

@ -148,10 +148,10 @@ else
fi fi
fi fi
SDKS=$(ls | grep -E "^MacOSX12.*|^MacOSX11.*|^MacOSX10.*" | grep -v "Patch") SDKS=$(ls | grep -E "^MacOSX\d.*" | grep -v Patch || echo)
if [ -z "$SDKS" ]; then if [ -z "$SDKS" ]; then
echo "No SDK found" 1>&2 echo "No SDK found in" $(pwd) 1>&2
exit 1 exit 1
fi fi