2016-10-04 06:50:16 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
BUNDLE="$1"
|
|
|
|
|
|
|
|
if ! test -d "${BUNDLE}" ; then
|
|
|
|
echo "${BUNDLE} is no bundle!" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Get the config
|
|
|
|
source codesign.conf
|
|
|
|
|
|
|
|
# Sign the .app
|
|
|
|
echo Signing ${BUNDLE}
|
|
|
|
codesign --sign "${DEVELOPER_ID}" --verbose --deep --force "${BUNDLE}"
|
|
|
|
|
|
|
|
# Verify it worked
|
|
|
|
echo Verifying the signature
|
|
|
|
codesign --verify --verbose --deep --force "${BUNDLE}"
|
|
|
|
RETURN_STATUS=$?
|
|
|
|
if [ $RETURN_STATUS -ne 0 ]; then
|
|
|
|
echo Code signing did not work, check the log
|
2016-10-04 07:51:28 -05:00
|
|
|
exit 1
|
2016-10-04 06:50:16 -05:00
|
|
|
else
|
|
|
|
echo ${BUNDLE} successfully signed
|
|
|
|
fi
|