Permalink
Browse files

xo: use delimiter on read for "file" output

  • Loading branch information...
1 parent bfa4940 commit 5685a1cf1bc72f63c95c0af518ef4cee34d2c387 @falconindy committed Oct 22, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 xo
View
@@ -30,13 +30,14 @@ handler[odf]=$doc
handler[ods]=$doc
handler[text/rtf]=$doc
handler[video]=$video
+handler[application/ogg]=$video
handler[mkv]=$video
handler[xls]=$doc
# Determine the MIME type via 'file' and assign it to an array
# mimetype[0] = major (e.g. image)
# mimetype[1] = minor (e.g. png)
-IFS='/' read -r -a mimetype < <(file -bi --mime-type "$1")
+IFS='/' read -rd ';' -a mimetype < <(file -bi --mime-type "$1")
# Determine the extension as a fallback method
ext=${1//*.}

0 comments on commit 5685a1c

Please sign in to comment.