#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/cmd/upas/send/main.c /tmp/main.c # srcdir: /n/juke/plan_9/sys/src/cmd/upas/send # version: 813599083 # date: Fri Oct 13 11:44:43 EDT 1995 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 813599083 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/cmd/upas/send 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 813599083 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 813599083 mkdir 813599083 target=813599083/main.c echo -n '813599083/main.c: ' if(! test -f $srcdir/main.c || ! test -r $srcdir/main.c){ echo $srcdir/main.c unreadable exit unreadable } sum=`{sum < $srcdir/main.c} if(! ~ 6e054ce510109 $sum(1)^$sum(2)){ echo $srcdir/main.c is not the original distribution file exit original } cp $srcdir/main.c 813599083/main.c ed 813599083/main.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM main.c' 421c if (!rmail && !forked) { . 146d 17a static int forked; . wq //GO.SYSIN DD VADIM main.c sum=`{sum < 813599083/main.c} if(~ 62fca62710119 $sum(1)^$sum(2)) echo if not{ echo 813599083/main.c checksum error creating updated file exit checksum }