1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-21 04:31:32 +03:00
vimr/bin/sign_vimr.sh

45 lines
1.7 KiB
Bash
Raw Normal View History

2020-11-15 00:19:32 +03:00
#!/bin/bash
set -Eeuo pipefail
readonly vimr_app_path=${vimr_app_path:?"Path to VimR.app"}
2023-10-31 02:18:47 +03:00
readonly identity="Developer ID Application: George Harker (B8V3694RNX)"
2020-11-15 00:19:32 +03:00
2022-03-19 12:20:05 +03:00
remove_sparkle_xpc () {
# VimR is not sandboxed, so, remove the XPCs
# https://sparkle-project.org/documentation/sandboxing/#removing-xpc-services
rm -rf "${vimr_app_path}/Contents/Frameworks/Sparkle.framework/Versions/B/XPCServices/org.sparkle-project.InstallerLauncher.xpc"
rm -rf "${vimr_app_path}/Contents/Frameworks/Sparkle.framework/Versions/B/XPCServices/org.sparkle-project.Downloader.xpc"
}
2020-11-15 00:19:32 +03:00
main () {
pushd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null
echo "### Signing VimR"
2020-11-16 00:11:01 +03:00
local entitlements_path
entitlements_path=$(realpath ./Carthage/Build/Mac/NvimServer/NvimServer.entitlements)
readonly entitlements_path
2020-11-15 00:19:32 +03:00
2022-03-19 12:20:05 +03:00
remove_sparkle_xpc
2020-11-15 00:19:32 +03:00
codesign --verbose --force -s "${identity}" --timestamp --options=runtime \
2022-03-19 12:20:05 +03:00
"${vimr_app_path}/Contents/Frameworks/Sparkle.framework/Versions/B/Autoupdate"
codesign --verbose --force -s "${identity}" --deep --timestamp --options=runtime \
"${vimr_app_path}/Contents/Frameworks/Sparkle.framework/Versions/B/Updater.app"
codesign --verbose --force -s "${identity}" --options=runtime \
"${vimr_app_path}/Contents/Frameworks/Sparkle.framework"
2020-11-15 00:19:32 +03:00
codesign --verbose --force -s "${identity}" --timestamp --options=runtime \
--entitlements="${entitlements_path}" \
"${vimr_app_path}/Contents/Resources/NvimView_NvimView.bundle/Contents/Resources/NvimServer"
codesign --verbose --force -s "${identity}" --deep --timestamp --options=runtime \
"${vimr_app_path}"
2020-11-16 00:11:01 +03:00
2020-11-15 00:19:32 +03:00
echo "### Signed VimR"
echo "### Use 'spctl -a -vvvv ${vimr_app_path}' to verify the signing."
popd >/dev/null
}
2022-03-19 12:20:05 +03:00
main