#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/libbio/bgetc.c /sys/src/libbio/bgetc.c # srcdir: /n/juke/plan_9/sys/src/libbio # version: 814133583 # date: Thu Oct 19 16:13:03 EDT 1995 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 814133583 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/libbio 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 814133583 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 814133583 mkdir 814133583 target=814133583/bgetc.c echo -n '814133583/bgetc.c: ' if(! test -f $srcdir/bgetc.c || ! test -r $srcdir/bgetc.c){ echo $srcdir/bgetc.c unreadable exit unreadable } sum=`{sum < $srcdir/bgetc.c} if(! ~ 260944b2924 $sum(1)^$sum(2)){ echo $srcdir/bgetc.c is not the original distribution file exit original } cp $srcdir/bgetc.c 814133583/bgetc.c ed 814133583/bgetc.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM bgetc.c' 33a bp->gbuf = bp->bbuf; . 28d wq //GO.SYSIN DD VADIM bgetc.c sum=`{sum < 814133583/bgetc.c} if(~ d5f6a125924 $sum(1)^$sum(2)) echo if not{ echo 814133583/bgetc.c checksum error creating updated file exit checksum }