application-octet-stream.sh.in
上传用户:weiyuanprp
上传日期:2020-05-20
资源大小:1169k
文件大小:1k
源码类别:
传真(Fax)编程
开发平台:
C/C++
- #! @SCRIPT_SH@
- #
- # This file is considered part of the software distribution,
- # and any changes made to it may get overwritten in a
- # subsequent upgrade or reinstallation. Instead of making
- # changes here, directly, consider copying the entire
- # default MIMEConverters directory to a custom location, i.e.
- # /usr/local/sbin/faxmail.custom, set MIMEConverters in
- # hyla.conf to point there, and make changes there instead.
- #
- DISCARDMSG="DISCARDED application/octet-stream goes here"
- FILECMD=file
- . @SPOOL@/etc/setup.cache
- if [ ! -x $FILECMD ]; then
- echo "$DISCARDMSG" | $LIBEXEC/textfmt -B
- exit
- fi
- MIMETYPE="`$FILECMD -bi "$1" | $SED 's/ .*//g'`"
- if [ -x $LIBDATA/faxmail/$MIMETYPE ]; then
- $LIBDATA/faxmail/$MIMETYPE "$1"
- else
- case "$MIMETYPE" in
- "application/postscript") cat "$1";;
- "message/rfc822") cat "$1" | $LIBEXEC/textfmt -B;;
- text/*) cat "$1" | $LIBEXEC/textfmt -B;;
- *) echo "$DISCARDMSG" | $LIBEXEC/textfmt -B;;
- esac
- fi
- exit