Annotation of 43BSDTahoe/new/news/src/sendbatch.sh, revision 1.1.1.1

1.1       root        1: : '@(#)sendbatch.sh    1.13    10/15/87'
                      2: 
                      3: cflags=
                      4: LIM=50000
                      5: CMD='LIBDIR/batch BATCHDIR/$rmt $BLIM'
                      6: ECHO=
                      7: COMP=
                      8: C7=
                      9: DOIHAVE=
                     10: RNEWS=rnews
                     11: 
                     12: for rmt in $*
                     13: do
                     14:        case $rmt in
                     15:        -[bBC]*)        cflags="$cflags $rmt"; continue;;
                     16:        -s*)    LIM=`expr "$rmt" : '-s\(.*\)'`
                     17:                continue;;
                     18:        -c7)    COMP='| LIBDIR/compress $cflags'
                     19:                C7='| LIBDIR/encode'
                     20:                ECHO='echo "#! c7unbatch"'
                     21:                continue;;
                     22:        -c)     COMP='| LIBDIR/compress $cflags'
                     23:                ECHO='echo "#! cunbatch"'
                     24:                continue;;
                     25:        -o*)    ECHO=`expr "$rmt" : '-o\(.*\)'`
                     26:                RNEWS='cunbatch'
                     27:                continue;;
                     28:        -i*)    DOIHAVE=`expr "$rmt" : '-i\(.*\)'`
                     29:                if test -z "$DOIHAVE"
                     30:                then
                     31:                        DOIHAVE=`uuname -l`
                     32:                fi
                     33:                continue;;
                     34:        esac
                     35: 
                     36:        if test -n "$COMP"
                     37:        then
                     38:                BLIM=`expr $LIM \* 2`
                     39:        else
                     40:                BLIM=$LIM
                     41:        fi
                     42: 
                     43:        : make sure $? is zero
                     44:        testit="yes"
                     45:        while test $? -eq 0 -a \( \( -n "$testit" -a -s BATCHDIR/$rmt \) -o -s BATCHDIR/$rmt.work -o  \( -n "$DOIHAVE" -a -s BATCHDIR/$rmt.ihave \) \)
                     46:        do
                     47:                if test -n "$DOIHAVE" -a -s BATCHDIR/$rmt.ihave
                     48:                then
                     49:                        mv BATCHDIR/$rmt.ihave BATCHDIR/$rmt.$$
                     50:                        LIBDIR/inews -t "cmsg ihave $DOIHAVE" -n to.$rmt.ctl < \
                     51:                                BATCHDIR/$rmt.$$
                     52:                        rm BATCHDIR/$rmt.$$
                     53:                                        
                     54:                else
                     55:                        (eval $ECHO; eval $CMD $COMP $C7) |
                     56:                        if test -s BATCHDIR/$rmt.cmd
                     57:                        then
                     58:                                BATCHDIR/$rmt.cmd
                     59:                        else
                     60:                                uux - UUXFLAGS $rmt!$RNEWS
                     61:                        fi
                     62:                        testit=
                     63:                fi
                     64:        done
                     65: done

unix.superglobalmegacorp.com

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