electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

sign.sh (797B)


      1 #!/bin/bash
      2 
      3 here=$(dirname "$0")
      4 test -n "$here" -a -d "$here" || exit
      5 cd $here
      6 
      7 CERT_FILE=${CERT_FILE:-~/codesigning/cert.pem}
      8 KEY_FILE=${KEY_FILE:-~/codesigning/key.pem}
      9 if [[ ! -f "$CERT_FILE" ]]; then
     10     ls $CERT_FILE
     11     echo "Make sure that $CERT_FILE and $KEY_FILE exist"
     12 fi
     13 
     14 if ! which osslsigncode > /dev/null 2>&1; then
     15     echo "Please install osslsigncode"
     16 fi
     17 
     18 rm -rf signed
     19 mkdir -p signed >/dev/null 2>&1
     20 
     21 cd dist
     22 echo "Found $(ls *.exe | wc -w) files to sign."
     23 for f in $(ls *.exe); do
     24     echo "Signing $f..."
     25     osslsigncode sign \
     26       -h sha256 \
     27       -certs "$CERT_FILE" \
     28       -key "$KEY_FILE" \
     29       -n "Electrum" \
     30       -i "https://electrum.org/" \
     31       -t "http://timestamp.digicert.com/" \
     32       -in "$f" \
     33       -out "../signed/$f"
     34     ls ../signed/$f -lah
     35 done