Mercurial > hg > Applications > mh
view postcnv @ 12:441a2190cfae
Lion fix
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 21 Apr 2012 13:10:49 +0900 |
parents | bce86c4163a3 |
children | 07f8972434be |
line wrap: on
line source
#!/usr/bin/perl @A = (); $i = 0; $tmp = "/tmp/postaa$$"; # /usr/local/mh/lib/post [-alias aliasfile] # [-filter filterfile] [-nofilter] [-format] [-noformat] # [-mime] [-nomime] [-msgid] [-nomsgid] [-verbose] # [-noverbose] [-watch] [-nowatch] [-width columns] file # [-help] while ( @ARGV ) { $_ = shift(@ARGV); # options require argument if( /^-alias/ ) { push(@A,$_); $_ = shift(@ARGV); push(@A,$_); } elsif( /^-filter/ ) { push(@A,$_); $_ = shift(@ARGV); push(@A,$_); } elsif( /^-idanno/ ) { push(@A,$_); $_ = shift(@ARGV); push(@A,$_); } elsif( /^-library/ ) { push(@A,$_); $_ = shift(@ARGV); push(@A,$_); } elsif( /^-width/ ) { push(@A,$_); $_ = shift(@ARGV); push(@A,$_); } elsif( /^-/ ) { push(@A,$_); } else { $f = $tmp . $i++; system("nkf -j -m0 < $_ > $f"); push(@A,$f); push(@U,$f); } } system "/usr/local/lib/mh/post @A"; unlink(@U);