bitcoin/contrib/macdeploy/detached-sig-create.sh

32 lines
771 B
Bash
Raw Normal View History

2014-11-21 21:26:45 -03:00
#!/bin/sh
# Copyright (c) 2014-2022 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
2014-11-21 21:26:45 -03:00
set -e
ROOTDIR=dist
BUNDLE="${ROOTDIR}/Bitcoin-Qt.app"
BINARY="${BUNDLE}/Contents/MacOS/Bitcoin-Qt"
SIGNAPPLE=signapple
2014-11-21 21:26:45 -03:00
TEMPDIR=sign.temp
ARCH=$(${SIGNAPPLE} info ${BINARY} | head -n 1 | cut -d " " -f 1)
OUT="signature-osx-${ARCH}.tar.gz"
OUTROOT=osx/dist
2014-11-21 21:26:45 -03:00
if [ -z "$1" ]; then
echo "usage: $0 <signapple args>"
echo "example: $0 <path to key>"
2014-11-21 21:26:45 -03:00
exit 1
fi
rm -rf ${TEMPDIR}
2014-11-21 21:26:45 -03:00
mkdir -p ${TEMPDIR}
${SIGNAPPLE} sign -f --detach "${TEMPDIR}/${OUTROOT}" "$@" "${BUNDLE}"
2014-11-21 21:26:45 -03:00
tar -C "${TEMPDIR}" -czf "${OUT}" .
rm -rf "${TEMPDIR}"
2014-11-21 21:26:45 -03:00
echo "Created ${OUT}"