#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/cmd/page /n/dump/1995/0718/sys/src/cmd/page # srcdir: /n/juke/plan_9/sys/src/cmd/page # version: 811707577 # date: Thu Sep 21 14:19:37 EDT 1995 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 811707577 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/cmd/page 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 811707577 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 811707577 mkdir 811707577 target=811707577/page.l echo -n '811707577/page.l: ' if(! test -f $srcdir/page.l || ! test -r $srcdir/page.l){ echo $srcdir/page.l unreadable exit unreadable } sum=`{sum < $srcdir/page.l} if(! ~ 9bc16c4e17079 $sum(1)^$sum(2)){ echo $srcdir/page.l is not the original distribution file exit original } cp $srcdir/page.l 811707577/page.l ed 811707577/page.l >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM page.l' 351a if(page[1]) bfree(page[1]); . 202c sprint(argbuf, "/tmp/.%.20s.%%.3d%c", p, suf); . wq //GO.SYSIN DD VADIM page.l sum=`{sum < 811707577/page.l} if(~ 0e583eff17117 $sum(1)^$sum(2)) echo if not{ echo 811707577/page.l checksum error creating updated file exit checksum }