mkrelease.sh: prevent double sign

This commit is contained in:
Harald Hoyer 2018-09-14 12:43:15 +02:00
parent 4c966c6d4a
commit 82d771110c

View file

@ -73,8 +73,10 @@ IMAGE="${BASEDIR}/$(jq -r '.name' ${JSON})-$(jq -r '.version' ${JSON})"
echo "Need --dbkey KEY --dbcrt CRT options" echo "Need --dbkey KEY --dbcrt CRT options"
exit 1 exit 1
fi fi
sbsign --key "$DBKEY" --cert "$DBCRT" --output bootx64-signed.efi bootx64.efi if ! sbverify --cert "$DBCRT" bootx64.efi &>/dev/null ; then
mv bootx64-signed.efi bootx64.efi sbsign --key "$DBKEY" --cert "$DBCRT" --output bootx64-signed.efi bootx64.efi
mv bootx64-signed.efi bootx64.efi
fi
fi fi
[[ -f sha512sum.txt ]] || sha512sum * > sha512sum.txt [[ -f sha512sum.txt ]] || sha512sum * > sha512sum.txt
[[ -f sha512sum.txt.sig ]] || gpg2 --detach-sign sha512sum.txt [[ -f sha512sum.txt.sig ]] || gpg2 --detach-sign sha512sum.txt