#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/alef/port/parl.y /sys/src/alef/port/parl.y # srcdir: /n/juke/plan_9/sys/src/alef/port # version: 825451400 # date: Tue Feb 27 15:03:20 EST 1996 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 825451400 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/alef/port 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 825451400 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 825451400 mkdir 825451400 target=825451400/parl.y echo -n '825451400/parl.y: ' if(! test -f $srcdir/parl.y || ! test -r $srcdir/parl.y){ echo $srcdir/parl.y unreadable exit unreadable } sum=`{sum < $srcdir/parl.y} if(! ~ 0dd9268a16547 $sum(1)^$sum(2)){ echo $srcdir/parl.y is not the original distribution file exit original } cp $srcdir/parl.y 825451400/parl.y ed 825451400/parl.y >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM parl.y' 241a | Ttypename { $$ = an(ONAME, nil, nil); if($1.t->type != TPOLY) { diag(nil, "type parameter must be poly [%T]", $1.t); $$->t = at(TPOLY, 0); $$->sym = enter("POLY", Ttypename); } else { $$->t = $1.t; $$->sym = $1.s; } } . wq //GO.SYSIN DD VADIM parl.y sum=`{sum < 825451400/parl.y} if(~ e5e4063916808 $sum(1)^$sum(2)) echo if not{ echo 825451400/parl.y checksum error creating updated file exit checksum }