Don't unnecessarily sign iOS/tvOS cores/libraries

This commit is contained in:
Eric Warmenhoven 2023-04-27 23:48:27 -04:00 committed by LibretroAdmin
parent 9d697fedcb
commit 13fc4cbda3
1 changed files with 12 additions and 8 deletions

View File

@ -55,15 +55,19 @@ IFS="
# Loop through all items. # Loop through all items.
for ITEM in $ITEMS; for ITEM in $ITEMS;
do do
echo "Signing '${ITEM}'" if codesign --display -r- "${ITEM}" | grep -q "${CODE_SIGN_IDENTITY_FOR_ITEMS}" ; then
codesign --force --verbose --sign "${CODE_SIGN_IDENTITY_FOR_ITEMS}" "${ITEM}" echo "Skipping '${ITEM}', already signed"
RESULT=$? else
if [ "$RESULT" != 0 ] ; then echo "Signing '${ITEM}'"
echo "Failed to sign '${ITEM}'." codesign --force --verbose --sign "${CODE_SIGN_IDENTITY_FOR_ITEMS}" "${ITEM}"
IFS=$SAVED_IFS RESULT=$?
exit 1 if [ "$RESULT" != 0 ] ; then
echo "Failed to sign '${ITEM}'."
IFS=$SAVED_IFS
exit 1
fi
fi fi
done done
# Restore $IFS. # Restore $IFS.
IFS=$SAVED_IFS IFS=$SAVED_IFS