#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/lib/acid/coverage /sys/lib/acid/coverage # srcdir: /n/juke/plan_9/sys/lib/acid # version: 827514411 # date: Fri Mar 22 12:06:51 EST 1996 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 827514411 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/lib/acid 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 827514411 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 827514411 mkdir 827514411 target=827514411/coverage echo -n '827514411/coverage: ' if(! test -f $srcdir/coverage || ! test -r $srcdir/coverage){ echo $srcdir/coverage unreadable exit unreadable } sum=`{sum < $srcdir/coverage} if(! ~ 653d6cbc1676 $sum(1)^$sum(2)){ echo $srcdir/coverage is not the original distribution file exit original } cp $srcdir/coverage 827514411/coverage ed 827514411/coverage >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM coverage' 36,43d 22a l = bblock; while l != {} do { *fmt(head l, bpfmt) = bpinst; l = tail l; } . 17,18c if match(l[0], bblock) < 0 then bblock = append bblock, l[0]; if match(l[1], bblock) < 0 then bblock = append bblock, l[1]; . 5c local lmap, lp, e, pc, n, l; . wq //GO.SYSIN DD VADIM coverage sum=`{sum < 827514411/coverage} if(~ 3750b07a1746 $sum(1)^$sum(2)) echo if not{ echo 827514411/coverage checksum error creating updated file exit checksum }