#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/libauth/getchal.c /sys/src/libauth/getchal.c # srcdir: /n/juke/plan_9/sys/src/libauth # version: 838680611 # date: Mon Jul 29 18:50:11 EDT 1996 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 838680611 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/libauth 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 838680611 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 838680611 mkdir 838680611 target=838680611/getchal.c echo -n '838680611/getchal.c: ' if(! test -f $srcdir/getchal.c || ! test -r $srcdir/getchal.c){ echo $srcdir/getchal.c unreadable exit unreadable } sum=`{sum < $srcdir/getchal.c} if(! ~ 943287881732 $sum(1)^$sum(2)){ echo $srcdir/getchal.c is not the original distribution file exit original } cp $srcdir/getchal.c 838680611/getchal.c ed 838680611/getchal.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM getchal.c' 81,82c if(c->afd >= 0) close(c->afd); if(c->asfd >= 0) close(c->asfd); . 59c char ticket[TICKETLEN+AUTHENTLEN]; . 49,50c if(c->afd >= 0) close(c->afd); if(c->asfd >= 0) close(c->asfd); . 27c goto err; . 25d 21c goto err; . 17a c->asfd = -1; . wq //GO.SYSIN DD VADIM getchal.c sum=`{sum < 838680611/getchal.c} if(~ 8466ac861813 $sum(1)^$sum(2)) echo if not{ echo 838680611/getchal.c checksum error creating updated file exit checksum }