0
|
1 #!/usr/bin/perl
|
|
2
|
|
3 @A = ();
|
|
4 $i = 0;
|
|
5 $tmp = "/tmp/postaa$$";
|
|
6
|
|
7 # /usr/local/mh/lib/post [-alias aliasfile]
|
|
8 # [-filter filterfile] [-nofilter] [-format] [-noformat]
|
|
9 # [-mime] [-nomime] [-msgid] [-nomsgid] [-verbose]
|
|
10 # [-noverbose] [-watch] [-nowatch] [-width columns] file
|
|
11 # [-help]
|
|
12
|
|
13 while ( @ARGV ) {
|
|
14 $_ = shift(@ARGV);
|
|
15 # options require argument
|
|
16 if( /^-alias/ ) {
|
|
17 push(@A,$_); $_ = shift(@ARGV); push(@A,$_);
|
|
18 } elsif( /^-filter/ ) {
|
|
19 push(@A,$_); $_ = shift(@ARGV); push(@A,$_);
|
|
20 } elsif( /^-idanno/ ) {
|
|
21 push(@A,$_); $_ = shift(@ARGV); push(@A,$_);
|
|
22 } elsif( /^-library/ ) {
|
|
23 push(@A,$_); $_ = shift(@ARGV); push(@A,$_);
|
|
24 } elsif( /^-width/ ) {
|
|
25 push(@A,$_); $_ = shift(@ARGV); push(@A,$_);
|
|
26 } elsif( /^-/ ) {
|
|
27 push(@A,$_);
|
|
28 } else {
|
|
29 $f = $tmp . $i++;
|
|
30 system("nkf -j -m0 < $_ > $f");
|
|
31 push(@A,$f); push(@U,$f);
|
|
32 }
|
|
33 }
|
|
34
|
|
35 system "/usr/local/lib/mh/post @A";
|
|
36
|
|
37 unlink(@U);
|
|
38
|