electrum

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

unsign.sh (938B)


      1 #!/bin/bash
      2 here=$(dirname "$0")
      3 test -n "$here" -a -d "$here" || exit
      4 cd $here
      5 
      6 if ! which osslsigncode > /dev/null 2>&1; then
      7     echo "Please install osslsigncode"
      8     exit
      9 fi
     10 
     11 # exit if command fails
     12 set -e
     13 
     14 mkdir -p signed >/dev/null 2>&1
     15 mkdir -p signed/stripped >/dev/null 2>&1
     16 
     17 version=`python3 -c "import electrum; print(electrum.version.ELECTRUM_VERSION)"`
     18 
     19 echo "Found $(ls dist/*.exe | wc -w) files to verify."
     20 
     21 for mine in $(ls dist/*.exe); do
     22     echo "---------------"
     23     f=$(basename $mine)
     24     echo "Downloading https://download.electrum.org/$version/$f"
     25     wget -q https://download.electrum.org/$version/$f -O signed/$f
     26     out="signed/stripped/$f"
     27     # Remove PE signature from signed binary
     28     osslsigncode remove-signature -in signed/$f -out $out > /dev/null 2>&1
     29     chmod +x $out
     30     if cmp -s $out $mine; then
     31 	echo "Success: $f"
     32 	gpg --sign --armor --detach signed/$f
     33     else
     34 	echo "Failure: $f"
     35     fi
     36 done