dogecoin/contrib/macdeploy/detached-sig-create.sh
Andrew Chow 27d691b6b5
gitian: use signapple to create the MacOS code signature
Github-Pull: #20880
Rebased-From: f55eed251488d70d5e2e3a2965a4f8ec0c476853
2021-06-08 16:57:32 -04:00

30 lines
650 B
Bash
Executable file

#!/bin/sh
# Copyright (c) 2014-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C
set -e
ROOTDIR=dist
BUNDLE="${ROOTDIR}/Bitcoin-Qt.app"
SIGNAPPLE=signapple
TEMPDIR=sign.temp
OUT=signature-osx.tar.gz
OUTROOT=osx/dist
if [ -z "$1" ]; then
echo "usage: $0 <signapple args>"
echo "example: $0 <path to key>"
exit 1
fi
rm -rf ${TEMPDIR}
mkdir -p ${TEMPDIR}
${SIGNAPPLE} sign -f --detach "${TEMPDIR}/${OUTROOT}" "$@" "${BUNDLE}"
tar -C "${TEMPDIR}" -czf "${OUT}" .
rm -rf "${TEMPDIR}"
echo "Created ${OUT}"