#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/cmd/8c/peep.c /sys/src/cmd/8c/peep.c # srcdir: /n/juke/plan_9/sys/src/cmd/8c # version: 826560814 # date: Mon Mar 11 11:13:34 EST 1996 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 826560814 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/cmd/8c 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 826560814 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 826560814 mkdir 826560814 target=826560814/peep.c echo -n '826560814/peep.c: ' if(! test -f $srcdir/peep.c || ! test -r $srcdir/peep.c){ echo $srcdir/peep.c unreadable exit unreadable } sum=`{sum < $srcdir/peep.c} if(! ~ b353ce549204 $sum(1)^$sum(2)){ echo $srcdir/peep.c is not the original distribution file exit original } cp $srcdir/peep.c 826560814/peep.c ed 826560814/peep.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM peep.c' 165a case AROLB: case AROLL: case AROLW: case ARORB: case ARORL: case ARORW: case ASALB: case ASALL: case ASALW: case ASARB: case ASARL: case ASARW: . wq //GO.SYSIN DD VADIM peep.c sum=`{sum < 826560814/peep.c} if(~ f54f53a79372 $sum(1)^$sum(2)) echo if not{ echo 826560814/peep.c checksum error creating updated file exit checksum }