From b7cc5f329c7d85f416cc35af00d11fe93c74ec09 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 12 Jul 2021 15:58:36 +0200 Subject: [PATCH] osx: add script to compare dmg binaries --- contrib/osx/compare_dmg | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 contrib/osx/compare_dmg diff --git a/contrib/osx/compare_dmg b/contrib/osx/compare_dmg new file mode 100755 index 000000000..85832d309 --- /dev/null +++ b/contrib/osx/compare_dmg @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +src_dir=$(dirname "$0") +cd "$src_dir/../.." + +hdiutil attach $1 +cp -r /Volumes/Electrum/Electrum.app/ dist/Electrum.app.signed +hdiutil detach /Volumes/Electrum + +# remove their signatures +for i in $(find dist/Electrum.app.signed/Contents/MacOS/ ); do codesign --remove-signature $i; done; + +# remove our signatures +for i in $(find dist/Electrum.app/Contents/MacOS/ ); do codesign --remove-signature $i; done; + +diff=$(diff -qr dist/Electrum.app dist/Electrum.app.signed) +echo $diff +if [ "$diff" ] +then + echo "failure" +else + echo "success" +fi