#!/bin/rc # # command: /bin/boddle /n/cd/sys/src/fs/port port # srcdir: /n/cd/sys/src/fs/port # version: 918339766 # date: Sat Feb 6 17:22:46 EST 1999 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 918339766 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/n/cd/sys/src/fs/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 918339766 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 918339766 mkdir 918339766 target=918339766/config.c echo -n '918339766/config.c: ' if(! test -f $srcdir/config.c || ! test -r $srcdir/config.c){ echo $srcdir/config.c unreadable exit unreadable } sum=`{sum < $srcdir/config.c} if(! ~ cf91907b11250 $sum(1)^$sum(2)){ echo $srcdir/config.c is not the original distribution file exit original } cp $srcdir/config.c 918339766/config.c ed 918339766/config.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM config.c' 151a else if(c == 'h') d.type = Devide; . 147a case 'h': /* h[#.]# ide [ctrl] unit */ . wq //GO.SYSIN DD VADIM config.c sum=`{sum < 918339766/config.c} if(~ cc59aca911330 $sum(1)^$sum(2)) echo if not{ echo 918339766/config.c checksum error creating updated file exit checksum } target=918339766/sub.c echo -n '918339766/sub.c: ' if(! test -f $srcdir/sub.c || ! test -r $srcdir/sub.c){ echo $srcdir/sub.c unreadable exit unreadable } sum=`{sum < $srcdir/sub.c} if(! ~ 48dc1f9517020 $sum(1)^$sum(2)){ echo $srcdir/sub.c is not the original distribution file exit original } cp $srcdir/sub.c 918339766/sub.c ed 918339766/sub.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM sub.c' 1142a break; case Devide: ideinit(d); . 1086a case Devide: . 1015a case Devide: return idesize(d); . 983a case Devide: return idewrite(a, b, c); . 948a case Devide: return ideread(a, b, c); . wq //GO.SYSIN DD VADIM sub.c sum=`{sum < 918339766/sub.c} if(~ 5db9e29c17193 $sum(1)^$sum(2)) echo if not{ echo 918339766/sub.c checksum error creating updated file exit checksum }