#!/bin/rc # # command: /bin/boddle /n/juke/plan_9/sys/src/libc/port/doprint.c /sys/src/libc/port/doprint.c # srcdir: /n/juke/plan_9/sys/src/libc/port # version: 834688305 # date: Thu Jun 13 13:51:45 EDT 1996 # myname=$0 doextract=no fn usage{ echo $myname: usage: $myname '[-X] [src-directory]' >[1=2] exit usage } fn sigint{ rm -rf 834688305 exit interrupt } while(~ $1 -*){ switch($1){ case -X doextract=yes case -* usage } shift } switch($#*){ case 0 srcdir=/sys/src/libc/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 834688305 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 834688305 mkdir 834688305 target=834688305/doprint.c echo -n '834688305/doprint.c: ' if(! test -f $srcdir/doprint.c || ! test -r $srcdir/doprint.c){ echo $srcdir/doprint.c unreadable exit unreadable } sum=`{sum < $srcdir/doprint.c} if(! ~ 209ece9b11825 $sum(1)^$sum(2)){ echo $srcdir/doprint.c is not the original distribution file exit original } cp $srcdir/doprint.c 834688305/doprint.c ed 834688305/doprint.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM doprint.c' 134a if(s >= es) return s; . wq //GO.SYSIN DD VADIM doprint.c sum=`{sum < 834688305/doprint.c} if(~ d88a3efb11850 $sum(1)^$sum(2)) echo if not{ echo 834688305/doprint.c checksum error creating updated file exit checksum }