Something went wrong. Try again.
An auto tiler for macOS
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940#!/bin/bashset -euo pipefail
if [[ $# -lt 1 || $# -gt 2 ]]; then echo "Usage: $0 <previous-code> [current-code] | --print [code]" >&2 exit 2fi
cd "$(dirname "$0")/.."previous=$1current=${2:-build/Parcel.app}
requirement() { local app=$1 output if [[ ! -d $app && ! -f $app ]]; then echo "Signed code not found: $app" >&2 return 1 fi codesign --verify --strict "$app" || return output=$(codesign --display --requirements - "$app" 2>&1) || { printf '%s\n' "$output" >&2; return 1; } if [[ $output != *'designated => '* ]]; then echo "No designated requirement found for $app: $output" >&2 return 1 fi printf '%s\n' "${output#*designated => }"}
if [[ $previous == --print ]]; then requirement "$current" exitfi
old_requirement=$(requirement "$previous")new_requirement=$(requirement "$current")printf 'Previous: %s\nCurrent: %s\n' "$old_requirement" "$new_requirement"if [[ $old_requirement != "$new_requirement" ]]; then echo 'Designated requirement changed; Accessibility grants may be lost.' >&2 exit 1fi