summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ctov.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/ctov.sh b/bin/ctov.sh
index 018b70c..10b8d33 100755
--- a/bin/ctov.sh
+++ b/bin/ctov.sh
@@ -69,9 +69,11 @@ while getopts "hf:" f; do
esac
done
-if [ -n "$file" ] &&
- [ "$(file --brief --dereference --mime-type "$file")" != "application/csv" ]; then
- die "input is not a csv file"
+if [ -n "$file" ]; then
+ case "$(file --brief --dereference --mime-type "$file")" in
+ *"/csv") ;;
+ *) die "input is not a csv file" ;;
+ esac
fi
while read -r entry; do