source: trunk/third/nmh/etc/sendfiles @ 12455

Revision 12455, 784 bytes checked in by danw, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12454, which included commits to RCS files with non-trunk default branches.
  • Property svn:executable set to *
Line 
1#!/bin/sh
2#
3# $Id: sendfiles,v 1.1.1.1 1999-02-07 18:14:19 danw Exp $
4#
5# Send multiples files and/or directories as a tar/compressed
6# image, in a MIME message.
7#
8
9DELAY=0
10FROM=
11
12case "$1" in
13    -*) DELAY="`echo $1 | sed -e 's%-%%'`"
14        shift
15        ;;
16esac
17
18if [ ! -z "$PERSON" ]; then
19    FROM="-from $PERSON"
20fi
21
22if [ $# -lt 3 ]; then
23    echo 'usage: sendfiles: "mailpath" "subject-string" directory-or-file ...' 1>&2
24    exit 1;
25fi
26
27mailpath="$1"
28echo "mailpath = $mailpath" 1>&2
29shift
30
31subject="$1"
32echo "subject-string = $subject" 1>&2
33shift
34
35echo "files = $*" 1>&2
36
37tar cvf - "$@" | compress | \
38    viamail -to "$mailpath" -subject "$subject" \
39        -parameters "type=tar; x-conversions=compress" \
40        -comment "extract with uncompress | tar xvpf -" \
41        -delay "$DELAY" \
42        -verbose $FROM
Note: See TracBrowser for help on using the repository browser.