#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/cmd/rx.c /sys/src/cmd/rx.c # srcdir: /n/juke/plan_9/sys/src/cmd # version: 825437007 # date: Tue Feb 27 11:03:27 EST 1996 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 825437007 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/cmd 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 825437007 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 825437007 mkdir 825437007 target=825437007/rx.c echo -n '825437007/rx.c: ' if(! test -f $srcdir/rx.c || ! test -r $srcdir/rx.c){ echo $srcdir/rx.c unreadable exit unreadable } sum=`{sum < $srcdir/rx.c} if(! ~ f729d8653494 $sum(1)^$sum(2)){ echo $srcdir/rx.c is not the original distribution file exit original } cp $srcdir/rx.c 825437007/rx.c ed 825437007/rx.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM rx.c' 123c || write(fd, r, strlen(r)+1)<0 || write(fd, cmd, strlen(cmd)+1)<0){ . 121a r = ruser ? ruser : u; . 116a char *r; . 52a if(fd >= 0) . 33a case 'l': ruser = ARGF(); break; . 6a char *ruser; . wq //GO.SYSIN DD VADIM rx.c sum=`{sum < 825437007/rx.c} if(~ 891aab343592 $sum(1)^$sum(2)) echo if not{ echo 825437007/rx.c checksum error creating updated file exit checksum }