| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | |
| 3 | # Copyright 1994 David Carlisle |
| 4 | # This file may be redistributed and/or modified under the terms of the |
| 5 | # LaTeX Project Public License distributed from CTAN archives in directory |
| 6 | # macros/latex/base/lppl.txt; either version 1 of the License, or (at |
| 7 | # your option) any later version. |
| 8 | |
| 9 | testscip-shell system . . test. -f /bin/sh5scip-shell filesystem . . `/bin/sh5`. && testscip-shell system . . test. -z "$RUNNING_SH5" \ |
| 10 | && { UNAMES=`unamescip-shell system . . uname. -s`; testscip-shell system . . test. "x$UNAMES" = xULTRIX; } 2>/dev/nullscip-shell filesystem . . `/dev/null`. \ |
| 11 | && { RUNNING_SH5=true; export RUNNING_SH5; exec /bin/sh5scip-shell filesystem . . `/bin/sh5`. $0 ${1+"$@"}; } |
| 12 | unset RUNNING_SH5 |
| 13 | |
| 14 | testscip-shell system . . test. -f /bin/bshscip-shell filesystem . . `/bin/bsh`. && testscip-shell system . . test. -z "$RUNNING_BSH" \ |
| 15 | && { UNAMES=`unamescip-shell system . . uname. -s`; testscip-shell system . . test. "x$UNAMES" = xAIX; } 2>/dev/nullscip-shell filesystem . . `/dev/null`. \ |
| 16 | && { RUNNING_BSH=true; export RUNNING_BSH; exec /bin/bshscip-shell filesystem . . `/bin/bsh`. $0 ${1+"$@"}; } |
| 17 | unset RUNNING_BSH |
| 18 | |
| 19 | # hack around a bug in zsh: |
| 20 | testscip-shell system . . test. -n "${ZSH_VERSION+set}" && alias -g '${1+"$@"}'='"$@"' |
| 21 | |
| 22 | # we want to be able to use options to latex: |
| 23 | while :; do |
| 24 | case $1 in |
| 25 | -*) |
| 26 | latexoptions="$latexoptions \"$1\"" |
| 27 | shift;; |
| 28 | *) |
| 29 | break;; |
| 30 | esac |
| 31 | done |
| 32 | |
| 33 | echoscip-shell system . . echo. |
| 34 | echoscip-shell system . . echo. "*************************************" |
| 35 | echoscip-shell system . . echo. "* Using LaTeX, with pslatex package *" |
| 36 | echoscip-shell system . . echo. "*************************************" |
| 37 | echoscip-shell system . . echo. |
| 38 | |
| 39 | # messing around with \PSLATEXTMP is for AUCTeX which calls |
| 40 | # documents via latex \nonstopmode \input{file} |
| 41 | |
| 42 | latex $latexoptions \ |
| 43 | "\AtBeginDocument{\RequirePackage{pslatex}}"\ |
| 44 | "\def\PSLATEXTMP{\futurelet\PSLATEXTMP\PSLATEXTMPB}"\ |
| 45 | "\def\PSLATEXTMPB{\ifx\PSLATEXTMP\nonstopmode\else\input\fi}"\ |
| 46 | "\PSLATEXTMP" ${1+"$@"} |