| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | # options for dvips are passwd down |
| 3 | |
| 4 | testscip-shell system . . test. -f /bin/sh5scip-shell filesystem . . `/bin/sh5`. && testscip-shell system . . test. -z "$RUNNING_SH5" \ |
| 5 | && { UNAMES=`unamescip-shell system . . uname. -s`; testscip-shell system . . test. "x$UNAMES" = xULTRIX; } 2>/dev/nullscip-shell filesystem . . `/dev/null`. \ |
| 6 | && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5scip-shell filesystem . . `/bin/sh5`. $0 ${1+"$@"}; } |
| 7 | unset RUNNING_SH5 |
| 8 | |
| 9 | testscip-shell system . . test. -f /bin/bshscip-shell filesystem . . `/bin/bsh`. && testscip-shell system . . test. -z "$RUNNING_BSH" \ |
| 10 | && { UNAMES=`unamescip-shell system . . uname. -s`; testscip-shell system . . test. "x$UNAMES" = xAIX; } 2>/dev/nullscip-shell filesystem . . `/dev/null`. \ |
| 11 | && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bshscip-shell filesystem . . `/bin/bsh`. $0 ${1+"$@"}; } |
| 12 | unset RUNNING_BSH |
| 13 | |
| 14 | # hack around a bug in zsh: |
| 15 | testscip-shell system . . test. -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' |
| 16 | |
| 17 | progname=`basenamescip-shell system . . basename. "$0"` |
| 18 | helpscip-shell shell texlive-bin 2026.20260303.78225+ds-4 help().() |
| 19 | { |
| 20 | echoscip-shell system . . echo. "Usage: $progname [-hi|-lo] file[.dvi] [options for dvips]" |
| 21 | echoscip-shell system . . echo. " -hi: use high fax resolution (204x196) (default)" |
| 22 | echoscip-shell system . . echo. " -lo: use low fax resolution (204x98)" |
| 23 | echoscip-shell system . . echo. |
| 24 | echoscip-shell system . . echo. "Example: $progname foo -l 2" |
| 25 | } |
| 26 | |
| 27 | dvipsconf=dfaxhigh; gsdev=dfaxhigh |
| 28 | case $1 in |
| 29 | -hi) gsdev=dfaxhigh; shift;; |
| 30 | -lo) gsdev=dfaxlow; shift;; |
| 31 | esac |
| 32 | |
| 33 | case $# in |
| 34 | 0) helpscip-shell shell texlive-bin 2026.20260303.78225+ds-4 help(). >&2 |
| 35 | exit 1 |
| 36 | ;; |
| 37 | esac |
| 38 | |
| 39 | NAME=`basenamescip-shell system . . basename. "$1" .dvi` |
| 40 | dvips "$@" -P$dvipsconf -f | |
| 41 | gs -q -dSAFER -sDEVICE=$gsdev -sOutputFile="$NAME-%03d.fax" -sNOPAUSE - |