1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
#! /bin/sh
set -e
if [ -x /usr/sbin/update-mime ]; then
update-mime
exit 0
fi
# Install the old mime-support way
if [ -x /usr/sbin/install-mime ]; then
install-mime --install --package=pstotext \
--content=application/postscript --copiousoutput=t \
--view="pstotext %s" \
--comment="Place this entry last in the priority list, \
unless you really know what you are doing."
install-mime --install --package=pstotext \
--content=application/ghostview --copiousoutput=t \
--view="pstotext %s" \
--comment="Place this entry last in the priority list, \
unless you really know what you are doing."
# According to the pstotext webpages, gs >= 3.51 is needed for PDF.
install-mime --install --package=pstotext --content=application/pdf \
--copiousoutput=t \
--test='expr `gs --version` ">=" 3.51 >/dev/null 2>&1' \
--view="pstotext %s" \
--comment="Place this entry last in the priority list, \
unless you really know what you are doing."
fi
|