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 mime-support (3.44-1) unstable; urgency=medium
* added new mime.types (closes: 485863, 485929, 472262) * added new mime.types (closes: 485863, 485929, 472262)
......
dh_md5sums
dh_md5sums
...@@ -138,6 +138,7 @@ application/vnd.accpac.simply.aso ...@@ -138,6 +138,7 @@ application/vnd.accpac.simply.aso
application/vnd.accpac.simply.imp application/vnd.accpac.simply.imp
application/vnd.acucobol application/vnd.acucobol
application/vnd.aether.imp application/vnd.aether.imp
application/vnd.android.package-archive apk
application/vnd.anser-web-certificate-issue-initiation application/vnd.anser-web-certificate-issue-initiation
application/vnd.anser-web-funds-transfer-initiation application/vnd.anser-web-funds-transfer-initiation
application/vnd.audiograph application/vnd.audiograph
...@@ -288,6 +289,13 @@ application/vnd.oasis.opendocument.text-master odm ...@@ -288,6 +289,13 @@ application/vnd.oasis.opendocument.text-master odm
application/vnd.oasis.opendocument.text-template ott application/vnd.oasis.opendocument.text-template ott
application/vnd.oasis.opendocument.text-web oth application/vnd.oasis.opendocument.text-web oth
application/vnd.osa.netdeploy 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.palm
application/vnd.pg.format application/vnd.pg.format
application/vnd.pg.osasli application/vnd.pg.osasli
...@@ -450,6 +458,7 @@ application/x-sh sh ...@@ -450,6 +458,7 @@ application/x-sh sh
application/x-shar shar application/x-shar shar
application/x-shellscript application/x-shellscript
application/x-shockwave-flash swf swfl application/x-shockwave-flash swf swfl
application/x-silverlight scr
application/x-stuffit sit sitx application/x-stuffit sit sitx
application/x-sv4cpio sv4cpio application/x-sv4cpio sv4cpio
application/x-sv4crc sv4crc application/x-sv4crc sv4crc
...@@ -647,6 +656,9 @@ model/vnd.gtw ...@@ -647,6 +656,9 @@ model/vnd.gtw
model/vnd.mts model/vnd.mts
model/vnd.vtu model/vnd.vtu
model/vrml wrl vrml model/vrml wrl vrml
model/x3d+vrml x3dv
model/x3d+xml x3d
model/x3d+binary x3db
multipart/alternative multipart/alternative
multipart/appledouble multipart/appledouble
...@@ -760,7 +772,7 @@ video/x-ms-wmx wmx ...@@ -760,7 +772,7 @@ video/x-ms-wmx wmx
video/x-ms-wvx wvx video/x-ms-wvx wvx
video/x-msvideo avi video/x-msvideo avi
video/x-sgi-movie movie video/x-sgi-movie movie
video/x-matroska mpv video/x-matroska mkv
x-conference/x-cooltalk ice x-conference/x-cooltalk ice
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
$debug=0; $debug=0;
$norun=0;
$etcmimetyp="/etc/mime.types"; $etcmimetyp="/etc/mime.types";
$shrmimetyp="/usr/share/etc/mime.types"; $shrmimetyp="/usr/share/etc/mime.types";
$locmimetyp="/usr/local/etc/mime.types"; $locmimetyp="/usr/local/etc/mime.types";
...@@ -39,6 +40,7 @@ sub Usage { ...@@ -39,6 +40,7 @@ sub Usage {
print STDERR "Options:\n"; print STDERR "Options:\n";
print STDERR " action specify what action to do on these files (default=view)\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 " 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 "\n";
print STDERR "Mime-Type:\n"; print STDERR "Mime-Type:\n";
print STDERR " any standard mime type designation in the form <class>/<subtype> -- if\n"; print STDERR " any standard mime type designation in the form <class>/<subtype> -- if\n";
...@@ -356,6 +358,7 @@ foreach (@ARGV) { ...@@ -356,6 +358,7 @@ foreach (@ARGV) {
unless ($action) { unless ($action) {
if ($0 =~ m!(^|/)view$!) { $action="view"; } if ($0 =~ m!(^|/)view$!) { $action="view"; }
elsif ($0 =~ m!(^|/)see$!) { $action="view"; } elsif ($0 =~ m!(^|/)see$!) { $action="view"; }
elsif ($0 =~ m!(^|/)cat$!) { $action="cat"; }
elsif ($0 =~ m!(^|/)edit$!) { $action="edit"; } elsif ($0 =~ m!(^|/)edit$!) { $action="edit"; }
elsif ($0 =~ m!(^|/)change$!) { $action="edit"; } elsif ($0 =~ m!(^|/)change$!) { $action="edit"; }
elsif ($0 =~ m!(^|/)compose$!) { $action="compose";} elsif ($0 =~ m!(^|/)compose$!) { $action="compose";}
...@@ -419,14 +422,14 @@ foreach (@files) { ...@@ -419,14 +422,14 @@ foreach (@files) {
$_ = "\Q$1\E"; s/\\\*/\.\*/g; $_ = "\Q$1\E"; s/\\\*/\.\*/g;
push @matches,$entry if ($type =~ m!^$_$!i); 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 $done=0;
my $fail=0; my $fail=0;
foreach $match (@matches) { foreach $match (@matches) {
my $comm; my $comm;
print STDERR " - checking mailcap entry \"$match\"\n" if $debug; 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*($|;)/); ($comm) = ($match =~ m/^.*?;\s*(.*?)\s*($|;)/);
} else { } else {
($comm) = ($match =~ m/\Q$action\E=(.*?)\s*($|;)/); ($comm) = ($match =~ m/\Q$action\E=(.*?)\s*($|;)/);
...@@ -455,7 +458,7 @@ foreach (@files) { ...@@ -455,7 +458,7 @@ foreach (@files) {
$fail++; $fail++;
next; 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:-"; $comm .= " | $0 --action=$action text/plain:-";
} }
...@@ -509,8 +512,13 @@ foreach (@files) { ...@@ -509,8 +512,13 @@ foreach (@files) {
$comm =~ s!$quotedprct!%!go; $comm =~ s!$quotedprct!%!go;
print STDERR " - executing: $comm\n" if $debug; print STDERR " - executing: $comm\n" if $debug;
$res = system $comm; if ($norun) {
$res = int($res/256); print $comm,"\n";
$res = 0;
} else {
$res = system $comm;
$res = int($res/256);
}
if ($res != 0) { if ($res != 0) {
print STDERR "Warning: program returned non-zero exit code \#$res\n"; print STDERR "Warning: program returned non-zero exit code \#$res\n";
$retcode = $res; $retcode = $res;
......
...@@ -57,6 +57,8 @@ All options are in the form --<opt>=<value>. ...@@ -57,6 +57,8 @@ All options are in the form --<opt>=<value>.
.BI \-\-action=<action> .BI \-\-action=<action>
Performs the specified action on the files. Valid actions are Performs the specified action on the files. Valid actions are
.IR view , .IR view ,
.IR cat
(like view but never paged) ,
.IR compose , .IR compose ,
.IR composetyped , .IR composetyped ,
.I edit .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