Rev 26330 | Blame | Last modification | View Log | Download | RSS feed
#! /bin/sh## Usage is## sh help-print.sh FILE TOPIC LATEX DVIPS## see src/library/utils/R/unix/help.R.FILE="${1}"TOPIC="${2}"LATEX="${3}"if test "${LATEX}" = "false"; thenecho "Cannot print, latex seems to be unavailable"exit 1fishift 3DVIPS="${@}"if test "${DVIPS}" = "false"; thenecho "Cannot print, dvips seems to be unavailable"exit 2fiODIR=`pwd`cd `(dirname "${FILE}") 2>/dev/null || \echo "${FILE}" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`${LATEX} "\\nonstopmode\\input{${FILE}}" >/dev/null 2>&1${DVIPS} "${FILE}" 2>/dev/nullif test -f "${FILE}.ps"; thenecho "Saving help page to '${TOPIC}.ps'"mv "${FILE}.ps" "${ODIR}/${TOPIC}.ps"firm -f "${FILE}.aux" "${FILE}.dvi" "${FILE}.log"### Local Variables: ***### mode: sh ***### sh-indentation: 2 ***### End: ***