#!/bin/rc # # command: /bin/boddle /usr/forsyth/cd/cmd/2a 2a # srcdir: /usr/forsyth/cd/cmd/2a # version: 817134797 # date: Thu Nov 23 13:53:17 GMT 1995 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 817134797 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/usr/forsyth/cd/cmd/2a 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 817134797 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 817134797 mkdir 817134797 target=817134797/lex.c echo -n '817134797/lex.c: ' if(! test -f $srcdir/lex.c || ! test -r $srcdir/lex.c){ echo $srcdir/lex.c unreadable exit unreadable } sum=`{sum < $srcdir/lex.c} if(! ~ 7b45832419010 $sum(1)^$sum(2)){ echo $srcdir/lex.c is not the original distribution file exit original } cp $srcdir/lex.c 817134797/lex.c ed 817134797/lex.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM lex.c' 170a "TT0", LTOS, D_TT0, /* 68030 only */ "TT1", LTOS, D_TT1, /* 68030 only */ "PSR", LTOS, D_PSR, /* 68030 only */ "PCSR", LTOS, D_PCSR, /* 68030 only */ . wq //GO.SYSIN DD VADIM lex.c sum=`{sum < 817134797/lex.c} if(~ e46e403b19168 $sum(1)^$sum(2)) echo if not{ echo 817134797/lex.c checksum error creating updated file exit checksum }