#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/9/port/portdat.h /sys/src/9/port/portdat.h # srcdir: /n/juke/plan_9/sys/src/9/port # version: 845586092 # date: Thu Oct 17 17:01:32 EDT 1996 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 845586092 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/9/port 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 845586092 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 845586092 mkdir 845586092 target=845586092/portdat.h echo -n '845586092/portdat.h: ' if(! test -f $srcdir/portdat.h || ! test -r $srcdir/portdat.h){ echo $srcdir/portdat.h unreadable exit unreadable } sum=`{sum < $srcdir/portdat.h} if(! ~ 6853e48917559 $sum(1)^$sum(2)){ echo $srcdir/portdat.h is not the original distribution file exit original } cp $srcdir/portdat.h 845586092/portdat.h ed 845586092/portdat.h >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM portdat.h' 791d 602a Lock rlock; /* sync sleep/wakeup with postnote */ . 107a #define M_RHANGUP 3 . wq //GO.SYSIN DD VADIM portdat.h sum=`{sum < 845586092/portdat.h} if(~ 36f3811517610 $sum(1)^$sum(2)) echo if not{ echo 845586092/portdat.h checksum error creating updated file exit checksum }