1995-01-14 07:41:52 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# mkchecksums.sh - generate interactive checksum-checking script.
|
1995-01-27 08:26:25 +00:00
|
|
|
# Author: Jordan Hubbard
|
1995-01-14 07:41:52 +00:00
|
|
|
#
|
|
|
|
# This script generates a cksum.sh script from a set of tarballs
|
|
|
|
# and should not be run by anyone but the release coordinator (there
|
|
|
|
# wouldn't be much point).
|
|
|
|
#
|
1995-01-27 08:26:25 +00:00
|
|
|
# $Id: mkchecksums.sh,v 1.1 1995/01/14 07:41:50 jkh Exp $
|
1995-01-14 07:41:52 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# Remove any previous attempts.
|
|
|
|
rm -rf CKSUMS do_cksum.sh
|
|
|
|
|
|
|
|
# First generate the CKSUMS file for the benefit of those who wish to
|
|
|
|
# use it in some other way. If we find out that folks aren't even using
|
|
|
|
# it, we should consider eliminating it at some point. The interactive
|
|
|
|
# stuff makes it somewhat superfluous.
|
|
|
|
cksum * > CKSUMS
|
|
|
|
|
|
|
|
# Now generate a script for actually verifying the checksums.
|
1995-01-27 08:26:25 +00:00
|
|
|
awk 'BEGIN {print "rval=0"} { printf("if [ -f %s ]; then if [ \"\`cksum %s%s%s\`\" != \"%s %s %s\" ]; then dialog --title \"Checksum Error\" --msgbox \"Checksum error detected on %s!\" -1 -1; rval=1; fi; fi\n", $3, "\047", $3, "\047", $1, $2, $3, $3);} END {print "exit $rval"}' < CKSUMS > do_cksum.sh
|
1995-01-14 07:41:52 +00:00
|
|
|
chmod +x do_cksum.sh
|