2014-11-21 21:26:45 -03:00
|
|
|
#!/bin/sh
|
2022-12-24 20:49:50 -03:00
|
|
|
# Copyright (c) 2014-2022 The Bitcoin Core developers
|
2016-09-11 16:36:22 -03:00
|
|
|
# Distributed under the MIT software license, see the accompanying
|
|
|
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2018-06-13 10:50:48 -04:00
|
|
|
export LC_ALL=C
|
2014-11-21 21:26:45 -03:00
|
|
|
set -e
|
|
|
|
|
|
|
|
ROOTDIR=dist
|
2015-06-01 10:42:34 -03:00
|
|
|
BUNDLE="${ROOTDIR}/Bitcoin-Qt.app"
|
2022-03-09 11:09:40 -03:00
|
|
|
BINARY="${BUNDLE}/Contents/MacOS/Bitcoin-Qt"
|
2021-01-07 15:50:22 -03:00
|
|
|
SIGNAPPLE=signapple
|
2014-11-21 21:26:45 -03:00
|
|
|
TEMPDIR=sign.temp
|
2022-03-09 11:09:40 -03:00
|
|
|
ARCH=$(${SIGNAPPLE} info ${BINARY} | head -n 1 | cut -d " " -f 1)
|
|
|
|
OUT="signature-osx-${ARCH}.tar.gz"
|
2021-01-07 15:50:22 -03:00
|
|
|
OUTROOT=osx/dist
|
2014-11-21 21:26:45 -03:00
|
|
|
|
2019-07-02 12:48:08 -04:00
|
|
|
if [ -z "$1" ]; then
|
2021-01-07 15:50:22 -03:00
|
|
|
echo "usage: $0 <signapple args>"
|
|
|
|
echo "example: $0 <path to key>"
|
2014-11-21 21:26:45 -03:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2021-01-07 15:50:22 -03:00
|
|
|
rm -rf ${TEMPDIR}
|
2014-11-21 21:26:45 -03:00
|
|
|
mkdir -p ${TEMPDIR}
|
|
|
|
|
2021-01-07 15:50:22 -03:00
|
|
|
${SIGNAPPLE} sign -f --detach "${TEMPDIR}/${OUTROOT}" "$@" "${BUNDLE}"
|
2014-11-21 21:26:45 -03:00
|
|
|
|
2015-05-15 18:54:20 -03:00
|
|
|
tar -C "${TEMPDIR}" -czf "${OUT}" .
|
|
|
|
rm -rf "${TEMPDIR}"
|
2014-11-21 21:26:45 -03:00
|
|
|
echo "Created ${OUT}"
|