#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/alef/8/reg.c /sys/src/alef/8/reg.c # srcdir: /n/juke/plan_9/sys/src/alef/8 # version: 825451362 # date: Tue Feb 27 15:02:42 EST 1996 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 825451362 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/alef/8 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 825451362 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 825451362 mkdir 825451362 target=825451362/reg.c echo -n '825451362/reg.c: ' if(! test -f $srcdir/reg.c || ! test -r $srcdir/reg.c){ echo $srcdir/reg.c unreadable exit unreadable } sum=`{sum < $srcdir/reg.c} if(! ~ 8811633a5295 $sum(1)^$sum(2)){ echo $srcdir/reg.c is not the original distribution file exit original } cp $srcdir/reg.c 825451362/reg.c ed 825451362/reg.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM reg.c' 354c sprint(buf, ".i%d", itmp++); . 346a static int itmp; . wq //GO.SYSIN DD VADIM reg.c sum=`{sum < 825451362/reg.c} if(~ d9b84cf05313 $sum(1)^$sum(2)) echo if not{ echo 825451362/reg.c checksum error creating updated file exit checksum }