50 lines
697 B
Bash
Executable File
50 lines
697 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $NetBSD: makesums,v 1.1 1999/07/22 20:10:17 is Exp $
|
|
#
|
|
# Make checksum files. Usage:
|
|
# makesums [-t tardir] [setname ...]
|
|
#
|
|
|
|
# set defaults
|
|
: ${MAKE=make}
|
|
tars=$RELEASEDIR
|
|
|
|
# handle args
|
|
while : ; do
|
|
case $1 in
|
|
-t*)
|
|
tars=$2; shift
|
|
;;
|
|
-*)
|
|
cat 1>&2 <<USAGE
|
|
Usage: $0 [-t tars] [setname ...]
|
|
-t tars \$RELEASEDIR [$tars]
|
|
[setname ...] sets to checksum [*.tgz]
|
|
USAGE
|
|
exit 1
|
|
;;
|
|
*)
|
|
break
|
|
;;
|
|
esac
|
|
shift
|
|
done
|
|
if [ -n "$*" ]; then
|
|
lists="$*"
|
|
fi
|
|
|
|
if [ -z "$tars" ]; then
|
|
echo \$RELEASEDIR must be set
|
|
exit 1
|
|
fi
|
|
|
|
cd $tars
|
|
if [ -z "$lists" ]; then
|
|
lists=*.tgz
|
|
fi
|
|
cksum -o1 $lists > BSDSUM
|
|
cksum $lists > CKSUM
|
|
cksum -m $lists > MD5
|
|
cksum -o2 $lists > SYSVSUM
|