mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-08 08:58:00 +00:00
5d718ef64b
The number of people has been steadily increasing who read our source code with an editor that thinks tab stops are 4 spaces apart, as opposed to the traditional tty-derived 8 that the PuTTY code expects. So I've been wondering for ages about just fixing it, and switching to a spaces-only policy throughout the code. And I recently found out about 'git blame -w', which should make this change not too disruptive for the purposes of source-control archaeology; so perhaps now is the time. While I'm at it, I've also taken the opportunity to remove all the trailing spaces from source lines (on the basis that git dislikes them, and is the only thing that seems to have a strong opinion one way or the other). Apologies to anyone downstream of this code who has complicated patch sets to rebase past this change. I don't intend it to be needed again.
61 lines
1.5 KiB
Bash
Executable File
61 lines
1.5 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
# Generate GPG signatures on a PuTTY release/snapshot directory as
|
|
# delivered by Buildscr.
|
|
|
|
# Usage: sh sign.sh [-r] <builddir>
|
|
# e.g. sh sign.sh putty (probably in the build.out directory)
|
|
# or sh sign.sh -r 0.60 (-r means use the release keys)
|
|
|
|
set -e
|
|
|
|
keyname=38BA7229B7588FD1
|
|
preliminary=false
|
|
|
|
while :; do
|
|
case "$1" in
|
|
-r)
|
|
shift
|
|
keyname=6289A25F4AE8DA82
|
|
;;
|
|
-p)
|
|
shift
|
|
preliminary=true
|
|
;;
|
|
-*)
|
|
echo "Unknown option '$1'" >&2
|
|
exit 1
|
|
;;
|
|
*)
|
|
break
|
|
;;
|
|
esac
|
|
done
|
|
|
|
sign() {
|
|
# Check for the prior existence of the signature, so we can
|
|
# re-run this script if it encounters an error part way
|
|
# through.
|
|
echo "----- Signing $2 with key '$keyname'"
|
|
test -f "$3" || \
|
|
gpg --load-extension=idea "$1" -u "$keyname" -o "$3" "$2"
|
|
}
|
|
|
|
cd "$1"
|
|
echo "===== Signing with key '$keyname'"
|
|
if $preliminary; then
|
|
sign --clearsign sha512sums ../sha512sums-preliminary.gpg
|
|
else
|
|
for i in putty*src.zip putty*.tar.gz \
|
|
w32/*.exe w32/*.zip w32/*.msi \
|
|
w64/*.exe w64/*.zip w64/*.msi \
|
|
wa32/*.exe wa32/*.zip wa32/*.msi \
|
|
wa64/*.exe wa64/*.zip wa64/*.msi \
|
|
w32old/*.exe w32old/*.zip; do
|
|
sign --detach-sign "$i" "$i.gpg"
|
|
done
|
|
for i in md5sums sha1sums sha256sums sha512sums; do
|
|
sign --clearsign "$i" "$i.gpg"
|
|
done
|
|
fi
|