aboutsummaryrefslogtreecommitdiff
path: root/contrib/macdeploy/detached-sig-apply.sh
blob: 813e99f9da5fad580ddb53a161d1a893d39db8a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/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

UNSIGNED="$1"
SIGNATURE="$2"
ROOTDIR=dist
OUTDIR=signed-app
SIGNAPPLE=signapple

if [ -z "$UNSIGNED" ]; then
  echo "usage: $0 <unsigned app> <signature>"
  exit 1
fi

if [ -z "$SIGNATURE" ]; then
  echo "usage: $0 <unsigned app> <signature>"
  exit 1
fi

${SIGNAPPLE} apply "${UNSIGNED}" "${SIGNATURE}"
mv ${ROOTDIR} ${OUTDIR}
echo "Signed: ${OUTDIR}"