Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Provide a script to compute the distribution set checksums.



details:   https://anonhg.NetBSD.org/src/rev/590a3f6f1ec9
branches:  trunk
changeset: 474844:590a3f6f1ec9
user:      is <is%NetBSD.org@localhost>
date:      Thu Jul 22 20:10:16 1999 +0000

description:
Provide a script to compute the distribution set checksums.
Make the Makefile use it, instead of calling cksum manually.

diffstat:

 distrib/sets/makesums |  49 +++++++++++++++++++++++++++++++++++++++++++++++++
 etc/Makefile          |  20 ++++----------------
 2 files changed, 53 insertions(+), 16 deletions(-)

diffs (89 lines):

diff -r 8a0a3b6eabc9 -r 590a3f6f1ec9 distrib/sets/makesums
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/sets/makesums     Thu Jul 22 20:10:16 1999 +0000
@@ -0,0 +1,49 @@
+#!/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
diff -r 8a0a3b6eabc9 -r 590a3f6f1ec9 etc/Makefile
--- a/etc/Makefile      Thu Jul 22 18:46:26 1999 +0000
+++ b/etc/Makefile      Thu Jul 22 20:10:16 1999 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.122 1999/07/21 06:51:30 mycroft Exp $
+#      $NetBSD: Makefile,v 1.123 1999/07/22 20:10:16 is Exp $
 #      from: @(#)Makefile      8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -237,23 +237,11 @@
 .if exists(../domestic) && !defined(EXPORTABLE_SYSTEM)
        sh ../distrib/sets/maketars -s ../distrib/sets \
                -d ${DESTDIR} -t ${RELEASEDIR}/binary/security secr
-       (cd ${RELEASEDIR}/binary/security && \
-               cksum -o 1 *.tgz >BSDSUM && \
-               cksum *.tgz >CKSUM && \
-               cksum -m *.tgz >MD5 && \
-               cksum -o 2 *.tgz >SYSVSUM )
+       sh ../distrib/sets/makesums -t ${RELEASEDIR}/binary/security
 .endif
-       (cd ${RELEASEDIR}/binary/sets && \
-               cksum -o 1 *.tgz >BSDSUM && \
-               cksum *.tgz >CKSUM && \
-               cksum -m *.tgz >MD5 && \
-               cksum -o 2 *.tgz >SYSVSUM )
+       sh ../distrib/sets/makesums -t ${RELEASEDIR}/binary/sets
 .ifdef EXTRA_KERNELS
-       (cd ${RELEASEDIR}/binary/kernel && \
-               cksum -o 1 *.gz >BSDSUM && \
-               cksum *.gz >CKSUM && \
-               cksum -m *.gz >MD5 && \
-               cksum -o 2 *.gz >SYSVSUM )
+       sh ../distrib/sets/makesums -t ${RELEASEDIR}/binary/kernel '*.gz'
 .endif
 
 snap_pre:



Home | Main Index | Thread Index | Old Index