#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/man/1/con /sys/man/1/con # srcdir: /n/juke/plan_9/sys/man/1 # version: 825437342 # date: Tue Feb 27 11:09:02 EST 1996 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 825437342 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/man/1 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 825437342 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 825437342 mkdir 825437342 target=825437342/con echo -n '825437342/con: ' if(! test -f $srcdir/con || ! test -r $srcdir/con){ echo $srcdir/con unreadable exit unreadable } sum=`{sum < $srcdir/con} if(! ~ 72ca6ff83879 $sum(1)^$sum(2)){ echo $srcdir/con is not the original distribution file exit original } cp $srcdir/con 825437342/con ed 825437342/con >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM con' 153a The .B \-e option causes a zero length message to be written to the connection when standard input is closed. The .B \-l option causes .I remuser to be used on the remote machine if the remote is a BSD machine. . 33a [ .B -l .I remuser ] . 32c .B -e . wq //GO.SYSIN DD VADIM con sum=`{sum < 825437342/con} if(~ c3d9cfe24111 $sum(1)^$sum(2)) echo if not{ echo 825437342/con checksum error creating updated file exit checksum }