#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/man/2/ndb /sys/man/2/ndb # srcdir: /n/juke/plan_9/sys/man/2 # version: 827758513 # date: Mon Mar 25 07:55:13 EST 1996 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 827758513 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/man/2 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 827758513 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 827758513 mkdir 827758513 target=827758513/ndb echo -n '827758513/ndb: ' if(! test -f $srcdir/ndb || ! test -r $srcdir/ndb){ echo $srcdir/ndb unreadable exit unreadable } sum=`{sum < $srcdir/ndb} if(! ~ 49fc55d74545 $sum(1)^$sum(2)){ echo $srcdir/ndb is not the original distribution file exit original } cp $srcdir/ndb 827758513/ndb ed 827758513/ndb >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM ndb' 171a It's first argument specifies the network root to use. If the argument is 0, it defaults to "/net". . 36c Ndbtuple* csgetval(char *netroot, char *attr, char *val, char *rattr, char *buf); . wq //GO.SYSIN DD VADIM ndb sum=`{sum < 827758513/ndb} if(~ 681731564660 $sum(1)^$sum(2)) echo if not{ echo 827758513/ndb checksum error creating updated file exit checksum }