#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/include/ndb.h /sys/include/ndb.h # srcdir: /n/juke/plan_9/sys/include # version: 827758577 # date: Mon Mar 25 07:56:17 EST 1996 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 827758577 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/include 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 827758577 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 827758577 mkdir 827758577 target=827758577/ndb.h echo -n '827758577/ndb.h: ' if(! test -f $srcdir/ndb.h || ! test -r $srcdir/ndb.h){ echo $srcdir/ndb.h unreadable exit unreadable } sum=`{sum < $srcdir/ndb.h} if(! ~ f59b2d1d4029 $sum(1)^$sum(2)){ echo $srcdir/ndb.h is not the original distribution file exit original } cp $srcdir/ndb.h 827758577/ndb.h ed 827758577/ndb.h >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM ndb.h' 157c Ndbtuple* csgetval(char*, char*, char*, char*, char*); . wq //GO.SYSIN DD VADIM ndb.h sum=`{sum < 827758577/ndb.h} if(~ 2b1995494036 $sum(1)^$sum(2)) echo if not{ echo 827758577/ndb.h checksum error creating updated file exit checksum }