Annotation of researchv10dc/cmd/wwb/mkstand.sh, revision 1.1

1.1     ! root        1: # NOTICE-NOT TO BE DISCLOSED OUTSIDE BELL SYS EXCEPT UNDER WRITTEN AGRMT
        !             2: L=/usr/lib/style
        !             3: 
        !             4: trap 'rm -f /tmp/$$*; trap 0; exit' 0 1 2 3 15
        !             5: if test $# = 0
        !             6: then
        !             7:        echo 'Usage: mkstand [-mm|-ms][-li|+li] [-o outfile] file1 file2 file3 ...'
        !             8:        exit 2
        !             9: fi
        !            10: mflag=-ms
        !            11: mlflag=-ml
        !            12: for flag in $*
        !            13: do case $flag in
        !            14:        -mm) mflag=-mm;shift;continue;;
        !            15:        -ms) mflag=-ms;shift;continue;;
        !            16:        -li|-ml) mlflag=-ml;shift;continue;;
        !            17:        +li|-tt) mlflag=;shift;continue;;
        !            18:        -o) shift;outfile=$1;shift;continue;;
        !            19:         -flags) echo "$0 [-mm|-ms][-li|+li][-o outfile][-ver][-flags] file1 file2 ..."; exit;;
        !            20:        -ver) echo "mkstand version 2.0: 2.0";exit;;
        !            21:        -*) echo unknown mkstand flag $flag;exit;;
        !            22:                *) if test ! -r $flag
        !            23:                   then echo Can\'t find the file $flag\; try specifying a more complete pathname.; exit
        !            24:                   fi
        !            25: esac
        !            26: done
        !            27: number=$#
        !            28: if test $number -eq 1
        !            29: then echo 'Mkstand requires more than one input file.
        !            30: The standards will be most reliable if you include more than 20 input files.
        !            31: Mkstand exits.'
        !            32:        exit 2
        !            33: fi
        !            34: if test $number -lt 20
        !            35: then   echo 'There are fewer than 20 input files.  Mkstand will compute standards,
        !            36: but they would be more reliable if you included at least 20
        !            37: input files.'
        !            38: fi
        !            39: for text in $*
        !            40: do
        !            41:        style $mflag $mlflag $text >> /tmp/$$stat.out
        !            42: done
        !            43: $L/mkstand $number $$
        !            44: if test \( $? -eq 0 -o $? -eq 2 \)
        !            45: then   echo Mkstand exits.
        !            46:        exit 2
        !            47: fi
        !            48: if test -z "$outfile"
        !            49: then   echo 'Mkstand is putting the standards it just compiled in
        !            50: a file called "stand.out"
        !            51: Use wwbstand to look at the standards in a readable way. Type
        !            52:                wwbstand -x stand.out
        !            53: Do not be concerned that some of the lines in stand.out are all zeros.
        !            54: Those zeros are placeholders for variables that prose may consider someday.'
        !            55: else   mv stand.out $outfile
        !            56:       echo "Your standards are now in file $outfile.
        !            57: Use wwbstand to look at the standards in a readable way. Type
        !            58:                wwbstand -x $outfile
        !            59: Do not be concerned that some of the lines in $outfile are all zeros.
        !            60: Those zeros are placeholders for variables that prose may consider someday."
        !            61: fi

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.