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 | |
---|
9 | DELAY=0 |
---|
10 | FROM= |
---|
11 | |
---|
12 | case "$1" in |
---|
13 | -*) DELAY="`echo $1 | sed -e 's%-%%'`" |
---|
14 | shift |
---|
15 | ;; |
---|
16 | esac |
---|
17 | |
---|
18 | if [ ! -z "$PERSON" ]; then |
---|
19 | FROM="-from $PERSON" |
---|
20 | fi |
---|
21 | |
---|
22 | if [ $# -lt 3 ]; then |
---|
23 | echo 'usage: sendfiles: "mailpath" "subject-string" directory-or-file ...' 1>&2 |
---|
24 | exit 1; |
---|
25 | fi |
---|
26 | |
---|
27 | mailpath="$1" |
---|
28 | echo "mailpath = $mailpath" 1>&2 |
---|
29 | shift |
---|
30 | |
---|
31 | subject="$1" |
---|
32 | echo "subject-string = $subject" 1>&2 |
---|
33 | shift |
---|
34 | |
---|
35 | echo "files = $*" 1>&2 |
---|
36 | |
---|
37 | tar 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.