24 lines
902 B
Bash
Executable File
24 lines
902 B
Bash
Executable File
#!/bin/bash
|
|
|
|
CUR_PATH=$(
|
|
cd $(dirname "$0");
|
|
pwd
|
|
)
|
|
ROOT_PATH=$(
|
|
cd "${CUR_PATH}/../";
|
|
pwd
|
|
)
|
|
|
|
function export_entitlements() {
|
|
codesign -d --entitlements - --xml "$1" 2>/dev/null | plutil -convert xml1 -o - - > "$2"
|
|
/usr/libexec/PlistBuddy -c "Delete :com.apple.security.application-groups" "$2" 2>/dev/null
|
|
/usr/libexec/PlistBuddy -c "Delete :com.apple.developer.team-identifier" "$2" 2>/dev/null
|
|
/usr/libexec/PlistBuddy -c "Delete :keychain-access-groups" "$2" 2>/dev/null
|
|
sed -i "" "s/8DKG4XB37M\.//g" "$2"
|
|
}
|
|
|
|
mkdir -p "${ROOT_PATH}/entitlements"
|
|
|
|
export_entitlements "/Volumes/App Cleaner & Uninstaller/App Cleaner 8.app" "${ROOT_PATH}/entitlements/App Cleaner 8.app.entitlements"
|
|
export_entitlements "/Volumes/App Cleaner & Uninstaller/App Cleaner 8.app/Contents/Library/LoginItems/App Cleaner Helper.app" "${ROOT_PATH}/entitlements/App Cleaner Helper.app.entitlements"
|