diff options
author | Bradley Sepos <[email protected]> | 2019-08-30 12:27:16 -0400 |
---|---|---|
committer | Bradley Sepos <[email protected]> | 2019-08-30 12:27:16 -0400 |
commit | 93a00c7aa2ac0b9194eacfcf5bf1ceb157cd3d56 (patch) | |
tree | 8929326f5cc73ad0e64cd90737d3093b2ef20d0a /macosx/hbsign | |
parent | 513caaa58ee3d7b80d4ce0305e3fb476d4bcb34f (diff) |
macosx: Minor cleanup of hbsign.
Diffstat (limited to 'macosx/hbsign')
-rwxr-xr-x | macosx/hbsign | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/macosx/hbsign b/macosx/hbsign index 013f3aa6a..12bcbba65 100755 --- a/macosx/hbsign +++ b/macosx/hbsign @@ -106,20 +106,19 @@ if [[ "${SANDBOX}" == true ]]; then elif [[ "${RUNTIME}" == true ]]; then ENTITLEMENTS_MAIN_FLAGS="--entitlements $SCRIPTDIR/HandBrake-RuntimeOnly.entitlements" ENTITLEMENTS_XPC_FLAGS="--entitlements $SCRIPTDIR/HandBrakeXPCService/HandBrakeXPCService-RuntimeOnly.entitlements" - ENTITLEMENTS_CLI_FLAGS="--entitlements $SCRIPTDIR/HandBrake-RuntimeOnly.entitlements" + ENTITLEMENTS_CLI_FLAGS="${ENTITLEMENTS_MAIN_FLAGS}" fi -function sign { # sign flags target UID - local TARGET FLAGS +function sign { # sign flags target + local TARGET FLAGS ERR TARGET="${2:-}" if [[ "${TARGET}" == "" ]]; then - ERR="${SELF_NAME}: target not specified to sign function\ncommand was: sign ${1:-} ${2:-} ${3:-}" + ERR="${SELF_NAME}: target not specified to sign function\ncommand was: sign ${1:-} ${2:-}" echo -e "${ERR}" >> "${LOG}" exit_with_error 1 "${ERR}" fi FLAGS="${1:-}" - if [[ "${FLAGS}" == "main" ]]; then codesign --force --verbose $RUNTIME_FLAGS $ENTITLEMENTS_MAIN_FLAGS -s "${IDENTITY}" "${2:-}" >>"${LOG}" 2>&1 || exit_with_error 1 "Signing failed. More info may be available in ${LOG}" elif [[ "${FLAGS}" == "xpc" ]]; then @@ -171,7 +170,7 @@ for TARGET in "${@}"; do if [[ "${TARGET##*/}" == 'HandBrakeCLI' ]]; then sign "cli" "${TARGET}" - fi + fi echo " Signing Executable" sign "main" "${TARGET}" fr.handbrake.HandBrake @@ -193,14 +192,14 @@ for TARGET in "${@}"; do fi echo " Validating Bundle" - codesign --verify --deep --strict --verbose=4 "${TARGET}" >>"${LOG}" 2>&1 || exit_with_error 1 "Validation failed. More info may be available in ${LOG}" + codesign --verify --deep --strict --verbose=4 "${TARGET}" >>"${LOG}" 2>&1 || exit_with_error 1 "Validation failed. More info may be available in ${LOG}" if [[ "${TARGET##*/}" != 'HandBrakeCLI' ]]; then - echo " Validating Execution Privileges" - spctl -a -t exec -vv "${TARGET}" >>"${LOG}" 2>&1 || exit_with_error 1 "Validation failed. More info may be available in ${LOG}" + echo " Validating Execution Privileges" + spctl -a -t exec -vv "${TARGET}" >>"${LOG}" 2>&1 || exit_with_error 1 "Validation failed. More info may be available in ${LOG}" fi done echo "Complete." -exit 0
\ No newline at end of file +exit 0 |