Skip to content

Commit

Permalink
Build: Fix macOS signing
Browse files Browse the repository at this point in the history
  • Loading branch information
MitchellCash committed Oct 2, 2018
1 parent bf1e046 commit d715ee6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contrib/macdeploy/detached-sig-apply.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fi

rm -rf ${TEMPDIR} && mkdir -p ${TEMPDIR}
tar -C ${TEMPDIR} -xf ${UNSIGNED}
tar -C ${TEMPDIR} -xf ${SIGNATURE}
cp -rf "${SIGNATURE}"/* ${TEMPDIR}

if [ -z "${PAGESTUFF}" ]; then
PAGESTUFF=${TEMPDIR}/pagestuff
Expand Down
5 changes: 3 additions & 2 deletions contrib/macdeploy/detached-sig-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ CODESIGN=codesign
TEMPDIR=sign.temp
TEMPLIST=${TEMPDIR}/signatures.txt
OUT=signature.tar.gz
OUTROOT=osx

if [ ! -n "$1" ]; then
echo "usage: $0 <codesign args>"
Expand All @@ -23,7 +24,7 @@ for i in `grep -v CodeResources ${TEMPLIST}`; do
TARGETFILE="${BUNDLE}/`echo ${i} | sed "s|.*${BUNDLE}/||"`"
SIZE=`pagestuff $i -p | tail -2 | grep size | sed 's/[^0-9]*//g'`
OFFSET=`pagestuff $i -p | tail -2 | grep offset | sed 's/[^0-9]*//g'`
SIGNFILE="${TEMPDIR}/${TARGETFILE}.sign"
SIGNFILE="${TEMPDIR}/${OUTROOT}/${TARGETFILE}.sign"
DIRNAME="`dirname ${SIGNFILE}`"
mkdir -p "${DIRNAME}"
echo "Adding detached signature for: ${TARGETFILE}. Size: ${SIZE}. Offset: ${OFFSET}"
Expand All @@ -32,7 +33,7 @@ done

for i in `grep CodeResources ${TEMPLIST}`; do
TARGETFILE="${BUNDLE}/`echo ${i} | sed "s|.*${BUNDLE}/||"`"
RESOURCE="${TEMPDIR}/${TARGETFILE}"
RESOURCE="${TEMPDIR}/${OUTROOT}/${TARGETFILE}"
DIRNAME="`dirname "${RESOURCE}"`"
mkdir -p "${DIRNAME}"
echo "Adding resource for: "${TARGETFILE}""
Expand Down

0 comments on commit d715ee6

Please sign in to comment.