Annotation of researchv10no/cmd/spell/spell.sh, revision 1.1

1.1     ! root        1: #!/bin/sh
        !             2: 
        !             3: spelldir=/usr/lib/spell
        !             4: 
        !             5: dict=${D_SPELL:-$spelldir/amspell}
        !             6: hist=${H_SPELL:-$spelldir/spellhist}
        !             7: addenda=${A_SPELL:-$HOME/lib/spelldict}
        !             8: sprog=${P_SPELL:-$spelldir/sprog}
        !             9: deroff=${deroff-"deroff -w"}
        !            10: 
        !            11: spellflags= deroffargs=
        !            12: 
        !            13: for x in $*
        !            14: do
        !            15:        case $x in
        !            16:        -b)
        !            17:                dict=${D_SPELL:-$spelldir/brspell}
        !            18:                spellflags="$spellflags $x" ;;
        !            19:        -[Ccvx])
        !            20:                spellflags="$spellflags $x" ;;
        !            21:        -d)
        !            22:                deroff=cat ;;
        !            23:        *.tex)
        !            24:                deroff=delatex
        !            25:                deroffargs="$deroffargs $x" ;;
        !            26:        *)
        !            27:                deroffargs="$deroffargs $x" 
        !            28:        esac
        !            29: done
        !            30: 
        !            31: case "$spellflags" in
        !            32: *c*)
        !            33:        $sprog -c -f $dict ;;
        !            34: *C*)
        !            35:        $sprog -C -f $dict 
        !            36:        exit
        !            37: esac
        !            38: 
        !            39: if test -r $addenda
        !            40: then coda="sort - $addenda $addenda | uniq -u | sort -f"
        !            41: else coda="sort -f"
        !            42: fi     #kluge until this works:  gre -F -x -v -f $addenda||exit 0
        !            43: 
        !            44: if test -w $hist
        !            45: then coda="$coda | tee -a $hist"       # puts -v trash in spellhist
        !            46: fi
        !            47: 
        !            48: $deroff $deroffargs | $sprog -f $dict $spellflags | sort -u | eval $coda

unix.superglobalmegacorp.com

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