summaryrefslogtreecommitdiff
path: root/bin/make-mimetypes
diff options
context:
space:
mode:
Diffstat (limited to 'bin/make-mimetypes')
-rwxr-xr-xbin/make-mimetypes36
1 files changed, 0 insertions, 36 deletions
diff --git a/bin/make-mimetypes b/bin/make-mimetypes
deleted file mode 100755
index 64c9120..0000000
--- a/bin/make-mimetypes
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/bin/env perl6
-
-use v6.c;
-
-sub MAIN (
- Str:D :$default = "application/octet-stream",
-) {
- my IO::Path $mime-types = "/etc/mime.types".IO;
-
- die "No $mime-types.absolute()" unless $mime-types.f;
-
- my %types;
-
- for $mime-types.lines -> $line {
- my ($mimetype, @extensions) = $line.words;
-
- for @extensions -> $extension {
- %types{$extension} = $mimetype;
- }
- }
-
- print-conf(%types, $default);
-}
-
-sub print-conf (
- %mimetypes,
- Str:D $default,
-) {
- say "mimetype.assign = (";
-
- for %mimetypes.kv -> $extension, $type {
- say "\t\".$extension\" => \"$type\",";
- }
-
- say "\"\" => \"$default\"\n)";
-}