You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
779 B
34 lines
779 B
#!/bin/bash
|
|
|
|
here=$(dirname "$0")
|
|
test -n "$here" -a -d "$here" || exit
|
|
cd $here
|
|
|
|
CERT_FILE=${CERT_FILE:-~/codesigning/cert.pem}
|
|
KEY_FILE=${KEY_FILE:-~/codesigning/key.pem}
|
|
if [[ ! -f "$CERT_FILE" ]]; then
|
|
ls $CERT_FILE
|
|
echo "Make sure that $CERT_FILE and $KEY_FILE exist"
|
|
fi
|
|
|
|
if ! which osslsigncode > /dev/null 2>&1; then
|
|
echo "Please install osslsigncode"
|
|
fi
|
|
|
|
rm -rf signed
|
|
mkdir -p signed >/dev/null 2>&1
|
|
|
|
cd dist
|
|
echo "Found $(ls *.exe | wc -w) files to sign."
|
|
for f in $(ls *.exe); do
|
|
echo "Signing $f..."
|
|
osslsigncode sign \
|
|
-certs "$CERT_FILE" \
|
|
-key "$KEY_FILE" \
|
|
-n "Electrum" \
|
|
-i "https://electrum.org/" \
|
|
-t "http://timestamp.digicert.com/" \
|
|
-in "$f" \
|
|
-out "../signed/$f"
|
|
ls ../signed/$f -lah
|
|
done
|
|
|