Commit | Line | Data |
---|---|---|
f8beb284 MW |
1 | # [should have a bin/sh line and EZPATH added above by make] |
2 | # | |
3 | # script to accept files in DIR/mod/pending. Use as: | |
4 | # ezmlm-accept DIR file1 [file2 ...] | |
5 | # where ``DIR'' is the list directory and ``file1'' is a file to be | |
6 | # accepted. ``ezmlm-accept DIR DIR/mod/pending/*'' will accept all | |
7 | # pending files. Files that are successfully sent to the list are | |
8 | # deled. See man page for details. | |
9 | ||
10 | EZSEND="${EZPATH}/ezmlm-send" | |
11 | FATAL='ezmlm-accept: fatal:' | |
12 | if [ ! -x "$EZSEND" ]; then | |
13 | echo "$FATAL please edit script to the correct ezmlm-send path" | |
14 | exit 100; | |
15 | fi | |
16 | ||
17 | DIR="$1" | |
18 | ||
19 | if [ -z "$1" ] || [ -z "$2" ]; then | |
20 | echo "$FATAL usage: ezmlm-accept DIR file1 [file2 ...]" | |
21 | exit 100; | |
22 | fi | |
23 | ||
24 | while [ -n "$2" ]; do | |
25 | if [ -x "$2" ]; then | |
26 | $EZSEND $DIR < "$2" && rm -f "$2" | |
27 | fi | |
28 | shift | |
29 | done | |
30 | exit 0; |