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

1.1     ! root        1: #!/bin/sh
        !             2: # MF -m -f or "", M map files, A other arguments
        !             3: # MFLAG and FFLAG 0 or 1 for -m or -f ever used
        !             4: FEATURE=no
        !             5: MAPPROG=${MAPPROG-/usr/lib/map}
        !             6: MAPDIR=${MAPDIR-/n/cetus/usr/maps}
        !             7: A= F=0 FFLAG=0 MFLAG=0
        !             8: for i in $*
        !             9: do
        !            10:        case $i in
        !            11:        -f)
        !            12:                F=1 FFLAG=1     A="$A -m ";;
        !            13:        -m)
        !            14:                F=0 MFLAG=1     A="$A $i ";;
        !            15:        -*)
        !            16:                F=0             A="$A $i ";;
        !            17:        *)
        !            18:                case $F$i in
        !            19:                1riv*4)         A="$A 201 202 203 204 ";;
        !            20:                1riv*3)         A="$A 201 202 203 ";;
        !            21:                1riv*2)         A="$A 201 202 ";;
        !            22:                1riv*)          A="$A 201 ";;
        !            23:                1iriv*[34])     A="$A 206 207 208 ";;
        !            24:                1iriv*2)        A="$A 206 207 ";;
        !            25:                1iriv*)         A="$A 206 ";;
        !            26:                1coast*4|1shore*4|1lake*4)      A="$A 101 102 103 104 ";;
        !            27:                1coast*3|1shore*3|1lake*3)      A="$A 101 102 103 ";;
        !            28:                1coast*2|1shore*2|1lake*2)      A="$A 101 102 ";;
        !            29:                1coast*|1shore*|1lake*)         A="$A 101 ";;
        !            30:                1ilake*[234]|1ishore*[234])     A="$A 106 107 ";;
        !            31:                1ilake*|1ishore*)               A="$A 106 ";;
        !            32:                1reef*)                 A="$A 108 ";;
        !            33:                1canal*[34])            A="$A 210 211 212 ";;
        !            34:                1canal*2)               A="$A 210 211 ";;
        !            35:                1canal*)                A="$A 210 ";;
        !            36:                1glacier*)              A="$A 115 ";;
        !            37:                1state*|1province*)     A="$A 401 ";;
        !            38:                1countr*[34])           A="$A 301 302 303 ";;
        !            39:                1countr*2)              A="$A 301 302 ";;
        !            40:                1countr*)               A="$A 301 ";;
        !            41:                1salt*[234])            A="$A 109 110 ";;
        !            42:                1salt*)                 A="$A 109 ";;
        !            43:                1ice*[234]|1shel*[234]) A="$A 113 114 ";;
        !            44:                1ice*|1shel*)           A="$A 113 ";;
        !            45:                1*)     echo map: unknown feature $i 1>&2
        !            46:                        exit 1 ;;
        !            47:                *)
        !            48:                        A="$A $i"
        !            49:                esac
        !            50:        esac
        !            51: done
        !            52: 
        !            53: case $MFLAG$FFLAG in
        !            54: 01)
        !            55:        case "$A " in
        !            56:        *" 101 "*)
        !            57:                : ;;
        !            58:        *)
        !            59:                A="$A -C black -m 101"
        !            60:        esac
        !            61: esac
        !            62: 
        !            63: MAP=${MAP-world} MAPDIR=$MAPDIR $MAPPROG $A

unix.superglobalmegacorp.com

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