summaryrefslogtreecommitdiff
path: root/bin/signtarballs
blob: 24bb6b8c6071157541797204d4b98fbdd4405c64 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

d=. ; while [ ! -d $d/_releases_ -a `readlink -e $d` != / ]; do d=$d/..; done

find $d/_releases_  -type f | egrep ".*(\.zip|\.tar\.gz|\.exe|\.dmg)$" | while read tarball; do
	test -f "${tarball}.md5" || { printf "md5: "; md5sum "${tarball}" | tee "${tarball}.md5"; }
	test -f "${tarball}.sha1" || { printf "sha1: "; sha1sum "${tarball}" | tee "${tarball}.sha1"; }
	test -f "${tarball}.sha256" || { printf "sha256: "; sha256sum "${tarball}" | tee "${tarball}.sha256"; }
	test -f "${tarball}.sha512" || { printf "sha512: "; sha512sum "${tarball}" | tee "${tarball}.sha512"; }
	test -f "${tarball}.asc" || { printf "signing ${tarball}... "; gpg -a -b --sign "${tarball}"; printf 'done.\n'; }
done