Permalink
Browse files

Clean up the signd function.

  • Loading branch information...
1 parent d72f7ac commit 32ab9ea6adf52adfb6ae1c35acfb0e43fedd74ee @dak180 dak180 committed Jan 6, 2013
Showing with 5 additions and 9 deletions.
  1. +5 −9 configs/scripts/Release-for-upload.sh
View
14 configs/scripts/Release-for-upload.sh
@@ -28,22 +28,18 @@ DOWNLOAD_BASE_URL="${DOWNLOAD_BASE_URL}/${DOWNLOAD_SUB_DIR}/${DOWNLOAD_TAG_DIR}"
# codesign setup
function signd {
- if [ ! -z "${CODE_SIGN_IDENTITY}" ]; then
+ if [[ ! -z "${CODE_SIGN_IDENTITY}" ]] && [[ ! -z ${CODE_SIGN_REQUIREMENTS_PATH} ]]; then
# Local Config
local appth="${1}"
local idetd="${CODE_SIGN_IDENTITY}"
local resrul="${CODE_SIGN_RESOURCE_RULES_PATH}"
local csreq="${CODE_SIGN_REQUIREMENTS_PATH}"
# Sign and verify the app
- if [[ ! -z "${resrul}" ]] && [[ ! -z "${csreq}" ]]; then
- cp -a "${resrul}" "${appth}/ResourceRules.plist"
- codesign -f --sign "${idetd}" --resource-rules="${appth}/ResourceRules.plist" --requirements "${csreq}" -vvv "${appth}"
- rm "${appth}/ResourceRules.plist"
- else
- codesign -f --sign "${idetd}" --requirements "${csreq}" -vvv "${appth}"
- fi
- if ! codesign -vvv --verify "${appth}"; then
+ cp -a "${resrul}" "${appth}/ResourceRules.plist"
+ /usr/bin/codesign -f --sign "${idetd}" --resource-rules="${appth}/ResourceRules.plist" --requirements "${csreq}" -vvv "${appth}"
+ rm "${appth}/ResourceRules.plist"
+ if ! codesign --verify -vvv "${appth}"; then
echo "warning: Code is improperly signed!" 1>&2
fi
else

0 comments on commit 32ab9ea

Please sign in to comment.