Commit 07c70e89 authored by Brian White's avatar Brian White

git-debimport mime-support_3.45-1.tar.gz

parent c66cadac
mime-support (3.45-1) unstable; urgency=medium
* added new mime.types (closes: 508381, 502977, 202586, 531225, 507665)
* added action "cat" that is like "view" but ignores "copiousoutput" (closes: 526690)
* added option "norun" to display final command without executing it
* file-type can now be determined by file/magic (closes: 77985)
* fixed forkbomb bug (closes: 522001)
-- Brian White <bcwhite@pobox.com> Thu, 18 Jun 2009 22:04:29 +0200
mime-support (3.44-1) unstable; urgency=medium
* added new mime.types (closes: 485863, 485929, 472262)
......
dh_md5sums
dh_md5sums
......@@ -138,6 +138,7 @@ application/vnd.accpac.simply.aso
application/vnd.accpac.simply.imp
application/vnd.acucobol
application/vnd.aether.imp
application/vnd.android.package-archive apk
application/vnd.anser-web-certificate-issue-initiation
application/vnd.anser-web-funds-transfer-initiation
application/vnd.audiograph
......@@ -288,6 +289,13 @@ application/vnd.oasis.opendocument.text-master odm
application/vnd.oasis.opendocument.text-template ott
application/vnd.oasis.opendocument.text-web oth
application/vnd.osa.netdeploy
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
application/vnd.openxmlformats-officedocument.presentationml.template potx
application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
application/vnd.palm
application/vnd.pg.format
application/vnd.pg.osasli
......@@ -450,6 +458,7 @@ application/x-sh sh
application/x-shar shar
application/x-shellscript
application/x-shockwave-flash swf swfl
application/x-silverlight scr
application/x-stuffit sit sitx
application/x-sv4cpio sv4cpio
application/x-sv4crc sv4crc
......@@ -647,6 +656,9 @@ model/vnd.gtw
model/vnd.mts
model/vnd.vtu
model/vrml wrl vrml
model/x3d+vrml x3dv
model/x3d+xml x3d
model/x3d+binary x3db
multipart/alternative
multipart/appledouble
......@@ -760,7 +772,7 @@ video/x-ms-wmx wmx
video/x-ms-wvx wvx
video/x-msvideo avi
video/x-sgi-movie movie
video/x-matroska mpv
video/x-matroska mkv
x-conference/x-cooltalk ice
......
......@@ -11,6 +11,7 @@
$debug=0;
$norun=0;
$etcmimetyp="/etc/mime.types";
$shrmimetyp="/usr/share/etc/mime.types";
$locmimetyp="/usr/local/etc/mime.types";
......@@ -39,6 +40,7 @@ sub Usage {
print STDERR "Options:\n";
print STDERR " action specify what action to do on these files (default=view)\n";
print STDERR " debug be verbose about what's going on\n";
print STDERR " norun just print but don't execute the command (useful with --debug)\n";
print STDERR "\n";
print STDERR "Mime-Type:\n";
print STDERR " any standard mime type designation in the form <class>/<subtype> -- if\n";
......@@ -356,6 +358,7 @@ foreach (@ARGV) {
unless ($action) {
if ($0 =~ m!(^|/)view$!) { $action="view"; }
elsif ($0 =~ m!(^|/)see$!) { $action="view"; }
elsif ($0 =~ m!(^|/)cat$!) { $action="cat"; }
elsif ($0 =~ m!(^|/)edit$!) { $action="edit"; }
elsif ($0 =~ m!(^|/)change$!) { $action="edit"; }
elsif ($0 =~ m!(^|/)compose$!) { $action="compose";}
......@@ -419,14 +422,14 @@ foreach (@files) {
$_ = "\Q$1\E"; s/\\\*/\.\*/g;
push @matches,$entry if ($type =~ m!^$_$!i);
}
@matches = grep(/\Q$action\E=/,@matches) unless $action eq "view";
@matches = grep(/\Q$action\E=/,@matches) unless ($action eq "view" || $action eq "cat");
my $done=0;
my $fail=0;
foreach $match (@matches) {
my $comm;
print STDERR " - checking mailcap entry \"$match\"\n" if $debug;
if ($action eq "view") {
if ($action eq "view" || $action eq "cat") {
($comm) = ($match =~ m/^.*?;\s*(.*?)\s*($|;)/);
} else {
($comm) = ($match =~ m/\Q$action\E=(.*?)\s*($|;)/);
......@@ -455,7 +458,7 @@ foreach (@files) {
$fail++;
next;
}
} elsif ($action eq 'view' && $match =~ m/;\s*copiousoutput\s*($|;)/) {
} elsif ($action eq 'view' && $match =~ m/;\s*copiousoutput\s*($|;)/ && $type ne 'text/plain') {
$comm .= " | $0 --action=$action text/plain:-";
}
......@@ -509,8 +512,13 @@ foreach (@files) {
$comm =~ s!$quotedprct!%!go;
print STDERR " - executing: $comm\n" if $debug;
if ($norun) {
print $comm,"\n";
$res = 0;
} else {
$res = system $comm;
$res = int($res/256);
}
if ($res != 0) {
print STDERR "Warning: program returned non-zero exit code \#$res\n";
$retcode = $res;
......
......@@ -57,6 +57,8 @@ All options are in the form --<opt>=<value>.
.BI \-\-action=<action>
Performs the specified action on the files. Valid actions are
.IR view ,
.IR cat
(like view but never paged) ,
.IR compose ,
.IR composetyped ,
.I edit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment