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).
11 # $Id: mkchecksums.sh,v 1.1 1994/11/17 15:20:04 jkh Exp $
14 # Remove any previous attempts.
15 rm -rf CKSUMS do_cksum.sh
17 # First generate the CKSUMS file for the benefit of those who wish to
18 # use it in some other way. If we find out that folks aren't even using
19 # it, we should consider eliminating it at some point. The interactive
20 # stuff makes it somewhat superfluous.
23 # Now generate a script for actually verifying the checksums.
24 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