#!/bin/sh # # $NetBSD: makesums,v 1.3 2002/03/31 15:17:58 bjh21 Exp $ # # Make checksum files for files in ``tardir''. Usage: # makesums [-t tardir] [ -all ] [setname ...] # # If -t is omitted, RELEASEDIR must be set and not empty. # The ``setname'' arguments comprise a list of files to checksum, # and may be omitted (in which case ``*.tgz'' is used). # If -all is given, then the list of sets is ignored, and ``*'' is used. # # After shell glob expansion, the list of sets is filtered to remove known # output file names (of the form *SUM and MD5), non-existent files, and # subdirectories. If this filtering leaves no files, then no output files are # produced. Otherwise the resulting list of files are checksummed and four # output files (BSDSUM, CKSUM, MD5, SYSVSUM) are produced. # # set defaults : ${CKSUM=cksum} : ${MAKE=make} # XXX: what purpose does this serve?? tars=$RELEASEDIR dash_all=no # handle args while : ; do case $1 in -all) dash_all=yes break ;; -t*) tars=$2; shift ;; -*) cat 1>&2 </dev/null` if [ -n "$lists" ]; then ${CKSUM} -o1 $lists > BSDSUM ${CKSUM} $lists > CKSUM ${CKSUM} -m $lists > MD5 ${CKSUM} -o2 $lists > SYSVSUM fi