/etc/profile: strip out cygwin paths from PATH
[msysgit.git] / bin / astextplain
blob6d1eb015bb3d988d0bdfeec0a0c024d7135f0048
1 #!/bin/sh -e
2 # minimalistic replacement for `run-mailcap --action=cat <file>`
4 if test "$#" != 1 ; then
5 echo "Usage: astextplain <file>" 1>&2
6 exit 1
7 fi
9 # XXX output encoding (UTF-8) hardcoded
10 case "$1" in
11 *.doc | *.DOC)
12 antiword -m UTF-8 "$1"
14 *.pdf | *.PDF)
15 pdftotext -layout "$1" -enc UTF-8 -
18 echo "E: unsupported filetype $1" 1>&2
19 exit 1
21 esac
23 exit 0