1#!/bin/sh -e 2# 3# Helper script for the build process to apply entitlements 4 5SRC="$1" 6DST="$2" 7ENTITLEMENT="$3" 8 9trap 'rm "$DST.tmp"' exit 10cp -af "$SRC" "$DST.tmp" 11codesign --entitlements "$ENTITLEMENT" --force -s - "$DST.tmp" 12mv "$DST.tmp" "$DST" 13trap '' exit 14