#Crap workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=222582
/usr/bin/munpack "$@" 2>&1|perl -nle '
use strict;
use warnings FATAL => q(all);
print STDERR;
if (m...@^(part\d+) \(text/(\w+)\)$@) {
    my $f = $1 . "." . ( $2 eq "plain" ? "txt" : $2 );
    if ( -f $f ) { print STDERR "$f exists already, skipping"; next }
    else         { die $! unless rename $1, $f }
    print "$1->$f";
}
'



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to