]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - release/mkchecksums.sh
This commit was generated by cvs2svn to compensate for changes in r4974,
[FreeBSD/FreeBSD.git] / release / mkchecksums.sh
1 #!/bin/sh
2 #
3 # mkchecksums.sh - generate interactive checksum-checking script.
4 # Jordan Hubbard
5 #
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).
9 #
10 #                                       Jordan
11 # $Id: mkchecksums.sh,v 1.1 1994/11/17 15:20:04 jkh Exp $
12 #
13
14 # Remove any previous attempts.
15 rm -rf CKSUMS do_cksum.sh
16
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.
21 cksum * > CKSUMS
22
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
25 chmod +x do_cksum.sh