#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/cmd/md5sum.l /n/dump/1995/0803/sys/src/cmd/md5sum.l # srcdir: /n/juke/plan_9/sys/src/cmd # version: 811712565 # date: Thu Sep 21 15:42:45 EDT 1995 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 811712565 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/cmd case 1 srcdir=$1 case * usage } if(! ~ $doextract yes){ echo This shell file contains a bundle of diffs representing changes echo to original source files in the Plan 9 distribution. It will run echo against the files in echo ' ' $srcdir echo '(unless overridden by the optional source directory argument)' echo and create a directory 811712565 containing the updated files. echo It will NOT automatically update the original files. echo echo Invoke with argument -X to perform the actual extraction. exit 0 } rm -rf 811712565 mkdir 811712565 target=811712565/md5sum.l echo -n '811712565/md5sum.l: ' if(! test -f $srcdir/md5sum.l || ! test -r $srcdir/md5sum.l){ echo $srcdir/md5sum.l unreadable exit unreadable } sum=`{sum < $srcdir/md5sum.l} if(! ~ db5e06416504 $sum(1)^$sum(2)){ echo $srcdir/md5sum.l is not the original distribution file exit original } cp $srcdir/md5sum.l 811712565/md5sum.l ed 811712565/md5sum.l >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM md5sum.l' 237c if(i || len == 0){ . wq //GO.SYSIN DD VADIM md5sum.l sum=`{sum < 811712565/md5sum.l} if(~ d40ce94e6516 $sum(1)^$sum(2)) echo if not{ echo 811712565/md5sum.l checksum error creating updated file exit checksum }