3 # mkchecksums.sh - generate interactive checksum-checking script.
6 # This script generates a cksum.sh script from a set of tarballs
7 # and should not be run by anyone but the release coordinator (there
8 # wouldn't be much point).
14 # First generate the CKSUMS file for the benefit of those who wish to
15 # use it in some other way. If we find out that folks aren't even using
16 # it, we should consider eliminating it at some point. The interactive
17 # stuff makes it somewhat superfluous.
20 # Now generate a script for actually verifying the checksums.
21 awk 'BEGIN {print "rval=0"} { printf("if [ \"\`cksum %s%s%s\`\" != \"%s %s %s\" ]; then dialog --title Error --infobox \"Checksum error detected on %s!\" -1 -1; rval=1; fi\n", "\047", $3, "\047", $1, $2, $3, $3);} END {print "exit $rval"}' < CKSUMS > do_cksum.sh