Rev 46893 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
## Usage is## sh help-print.sh FILE TOPIC LATEX DVIPS Rtexmf## 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="${1}"shiftRtexmf="${1}"TEXINPUTS=${Rtexmf}:${TEXINPUTS}:export TEXINPUTSODIR=`pwd`status=0cd `(dirname "${FILE}") 2>/dev/null || \echo "${FILE}" | ${SED=sed} -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`${LATEX} "\\nonstopmode\\input{${FILE}}" >/dev/null 2>&1 || status=1if test $status -gt 0; thenecho "Error in running latex command ('${LATEX}')"exit 1fi${DVIPS} "${FILE}" 2>/dev/null || status=1if test $status -gt 0; thenecho "Error in running dvips command ('${DVIPS}')"exit 1fiif test -f "${FILE}.ps"; thenecho "Saving help page to '${TOPIC}.ps'"mv "${FILE}.ps" "${ODIR}/${TOPIC}.ps"elseecho "Help page sent to printer"firm -f "${FILE}.aux" "${FILE}.dvi" "${FILE}.log"### Local Variables: ***### mode: sh ***### sh-indentation: 2 ***### End: ***