1
0
mirror of https://git.fsfe.org/FSFE/fsfe-local-build.git synced 2026-04-20 11:23:06 +02:00

initial commit

This commit is contained in:
2016-11-13 20:35:50 +01:00
commit e4c87a11b4
4 changed files with 38 additions and 0 deletions

20
create-mime.assign.pl Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/perl -w
use strict;
open MIMETYPES, "/etc/mime.types" or exit;
print "mimetype.assign = (\n";
my %extensions;
while(<MIMETYPES>) {
chomp;
s/\#.*//;
next if /^\w*$/;
if(/^([a-z0-9\/+-.]+)\s+((?:[a-z0-9.+-]+[ ]?)+)$/) {
foreach(split / /, $2) {
# mime.types can have same extension for different
# mime types
next if $extensions{$_};
$extensions{$_} = 1;
print "\".$_\" => \"$1\",\n";
}
}
}
print ")\n";