Annotation of 43BSD/contrib/mh/miscellany/mtrenv/bin/packit, revision 1.1.1.1

1.1       root        1: : run this script through /bin/sh
                      2: : packit used to be called "packf", but "pack" got changed to that
                      3: : PATH=:/bin:/usr/bin:/usr/ucb:/usr/uci:/usr/uci/lib/mh; export PATH
                      4: F="" M="" N=F
                      5: 
                      6: for A in $*
                      7: do
                      8:     case $A in
                      9:        -nov*)  N=F ;;
                     10: 
                     11:        -v*)    N=T ;;
                     12: 
                     13:        -*)     echo "packit: $A unknown" 1>&2
                     14:                exit 1 ;;
                     15: 
                     16:        +*|@*)  case $F in
                     17:                    "")  F=$A ;;
                     18:                    *)   echo "packit: only one folder at a time" 1>&2
                     19:                         exit 1 ;;
                     20:                esac ;;
                     21: 
                     22:        *)      M="$M $A" ;;
                     23:     esac
                     24: done
                     25: 
                     26: case $F in
                     27:     "")  F=+outbox ;;
                     28: esac
                     29: case $M in
                     30:     "")  M=all ;;
                     31: esac
                     32: 
                     33: prf=/tmp/prf$$ ctx=/tmp/ctx$$
                     34: trap "rm -f $prf $ctx" 0 1 2 3 13 15
                     35: 
                     36: rm -f $prf
                     37: echo "MH-Sequences:" > $prf
                     38: cat ${MH-$HOME/.mh_profile} >> $prf
                     39: MH="$prf" ; export MH
                     40: 
                     41: rm -f $ctx
                     42: cp ${MHCONTEXT-`mhpath +`/context} $ctx
                     43: MHCONTEXT="$ctx" ; export MHCONTEXT
                     44: 
                     45: if mhpath $F all > /dev/null;
                     46:     then
                     47:        P=`mhpath +`/OUTGOING
                     48:        C="packf -file $P $F $M"
                     49:        case $N in
                     50:            T)  echo $C ;;
                     51:        esac
                     52:        if $C;
                     53:        then
                     54:            C="rmm $F $M"
                     55:            case $N in
                     56:                T)  echo $C ;;
                     57:            esac
                     58:            if $C;
                     59:            then
                     60:                exit 0;
                     61:            else
                     62:                exit 1;
                     63:            fi
                     64:        else
                     65:            exit 1;
                     66:        fi
                     67:     else
                     68:        exit 1;
                     69: fi
                     70: 
                     71: exit 0

unix.superglobalmegacorp.com

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