9fans archive / 1996 / 11 / 50 / prev next
From: Russ Cox rsc@res...
Subject: okay. this time for sure.
Date: Tue, 19 Nov 1996 22:22:32 -0500 (EST)
sorry about all the hassles recently. the local
mail agent (sendmail; ugh.) is dropping my message
after the first period. run this through
sed 's/^-- //g' after you save it.
russ
--- cut here for 8safe.bod which you turn into 8active.bod
-- #!/bin/rc
-- #
-- # command: /bin/boddle /sys/clean-src/cmd/8½ /sys/src/cmd/8½
-- # srcdir: /sys/clean-src/cmd/8½
-- # version: 848378407
-- # date: Mon Nov 18 23:40:07 EST 1996
-- #
-- myname=$0
-- doextract=no
--
-- fn usage{
-- echo $myname: usage: $myname '[-X] [src-directory]' >[1=2]
-- exit usage
-- }
--
-- fn sigint{
-- rm -rf 848378407
-- exit interrupt
-- }
--
-- while(~ $1 -*){
-- switch($1){
-- case -X
-- doextract=yes
-- case -*
-- usage
-- }
-- shift
-- }
--
-- switch($#*){
-- case 0
-- srcdir=/sys/clean-src/cmd/8½
-- 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 848378407 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 848378407
-- mkdir 848378407
--
-- target=848378407/dat.h
-- echo -n '848378407/dat.h: '
-- if(! test -f $srcdir/dat.h || ! test -r $srcdir/dat.h){
-- echo $srcdir/dat.h unreadable
-- exit unreadable
-- }
-- sum=`{sum < $srcdir/dat.h}
-- if(! ~ 7bda55924355 $sum(1)^$sum(2)){
-- echo $srcdir/dat.h is not the original distribution file
-- exit original
-- }
-- cp $srcdir/dat.h 848378407/dat.h
-- ed 848378407/dat.h >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM dat.h'
-- 177a
-- extern int active;
-- .
-- 175d
-- 84a
-- char activeopen; /* /dev/active is open */
-- .
-- wq
-- //GO.SYSIN DD VADIM dat.h
-- sum=`{sum < 848378407/dat.h}
-- if(~ 882676234418 $sum(1)^$sum(2))
-- echo
-- if not{
-- echo 848378407/dat.h checksum error creating updated file
-- exit checksum
-- }
-- target=848378407/file.c
-- echo -n '848378407/file.c: '
-- if(! test -f $srcdir/file.c || ! test -r $srcdir/file.c){
-- echo $srcdir/file.c unreadable
-- exit unreadable
-- }
-- sum=`{sum < $srcdir/file.c}
-- if(! ~ 059e425118747 $sum(1)^$sum(2)){
-- echo $srcdir/file.c is not the original distribution file
-- exit original
-- }
-- cp $srcdir/file.c 848378407/file.c
-- ed 848378407/file.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM file.c'
-- 878a
-- break;
--
-- case Qactive:
-- w->activeopen = 0;
-- .
-- 733a
-- active = 1;
-- .
-- 724a
-- active = 1;
-- .
-- 667a
-- case Qactive:
-- s = active ? "y" : "n";
-- active = 0;
-- goto rstring;
--
-- .
-- 529a
--
-- case Qactive:
-- if(mode != OREAD) {
-- err = Eperm;
-- goto send;
-- }
-- if(w->activeopen) {
-- err = Einuse;
-- goto send;
-- }
-- w->activeopen = 1;
-- break;
-- .
-- 127a
-- "active", {Qactive}, 0400, 0,
-- .
-- 122a
-- Qactive,
-- .
-- 82a
-- char updbuf[80];
-- .
-- wq
-- //GO.SYSIN DD VADIM file.c
-- sum=`{sum < 848378407/file.c}
-- if(~ 006b709619113 $sum(1)^$sum(2))
-- echo
-- if not{
-- echo 848378407/file.c checksum error creating updated file
-- exit checksum
-- }
-- target=848378407/main.c
-- echo -n '848378407/main.c: '
-- if(! test -f $srcdir/main.c || ! test -r $srcdir/main.c){
-- echo $srcdir/main.c unreadable
-- exit unreadable
-- }
-- sum=`{sum < $srcdir/main.c}
-- if(! ~ 23ecc2ea15494 $sum(1)^$sum(2)){
-- echo $srcdir/main.c is not the original distribution file
-- exit original
-- }
-- cp $srcdir/main.c 848378407/main.c
-- ed 848378407/main.c >/dev/null >[2=1] <<'//GO.SYSIN DD VADIM main.c'
-- 31c
-- int active;
-- .
-- wq
-- //GO.SYSIN DD VADIM main.c
-- sum=`{sum < 848378407/main.c}
-- if(~ 1c05092715505 $sum(1)^$sum(2))
-- echo
-- if not{
-- echo 848378407/main.c checksum error creating updated file
-- exit checksum
-- }