diff options
author | Patrick Spek <p.spek@tyil.nl> | 2021-12-15 10:45:58 +0100 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2021-12-15 10:45:58 +0100 |
commit | 5c086bc52fa3a226bcf706b1f420a5d98ea377dd (patch) | |
tree | da5b28238542247efbe36c49cbc6cfd4e49f3e36 /bin/make-mimetypes | |
parent | 64e0495846f8b680288280920cba6bcb28e4092f (diff) |
Redo most of the blog in Hugo
Missing posts will have to be added later
Diffstat (limited to 'bin/make-mimetypes')
-rwxr-xr-x | bin/make-mimetypes | 36 |
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)"; -} |