X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=nginx-mime.types.sh;h=14df64b7f9c949a27048a08a87e835e359eeedcb;hb=d323480a28872ebcf61cb4e663275cfbd918e091;hp=fdc31529a80b135be19d9b3fdeada4582bf5557b;hpb=aae18100e667f0ca48ba44c043e77b3fee045774;p=packages%2Fnginx.git diff --git a/nginx-mime.types.sh b/nginx-mime.types.sh index fdc3152..14df64b 100644 --- a/nginx-mime.types.sh +++ b/nginx-mime.types.sh @@ -16,7 +16,13 @@ awk '!/^#/ && $2 { print } ' $mimetypes | \ # sort it \ LC_ALL=C sort -u | \ # build conf fragment -awk '{ printf("\t%-40s %s;\n", $1, $2)}' \ +awk '{ + m = $1; + v = substr($0, length($1)); + x = substr(v, index(v, $2)); + gsub(/\t+/, " ", x); + printf("\t%-40s %s;\n", m, x); +}' \ >> mime.types # footer