📄 run-fop.sh
字号:
#!/bin/sh# run-fop: Attempt to run fop (or fop.sh), fail articulately otherwise.## Usage: run-fop.sh [FOP_ARGS...]## This script is meant to be invoked by book translation Makefiles.# Arguments are passed along to `fop'.# If the user has a .foprc, source it.if [ -f ${HOME}/.foprc ]; then . ${HOME}/.foprcfi# The fop of last resort.DESPERATION_FOP_DIR="`dirname \"$0\"`/../fop"DESPERATION_FOP_PGM=${DESPERATION_FOP_DIR}/fop.shif [ "${FOP_HOME}X" = X ]; then FOP_HOME=${DESPERATION_FOP_DIR} export FOP_HOMEfi# Unfortunately, 'which' seems to behave slightly differently on every# platform, making it unreliable for shell scripts. Just do it inline# instead. Also, note that we search for `fop' or `fop.sh', since# different systems seem to package it different ways.SAVED_IFS=${IFS}IFS=:PATH=${PATH}:${FOP_HOME}for dir in ${PATH}; do if [ -x ${dir}/fop -a "${FOP_PGM}X" = X ]; then FOP_PGM=${dir}/fop elif [ -x ${dir}/fop.sh -a "${FOP_PGM}X" = X ]; then FOP_PGM=${dir}/fop.sh fidoneIFS=${SAVED_IFS}if [ "${FOP_PGM}X" = X ]; then FOP_PGM=${DESPERATION_FOP_PGM}fiecho "(Using '${FOP_PGM}' for FOP)"# FOP is noisy on stdout, and -q doesn't seem to help, so stuff that# garbage into /dev/null.${FOP_PGM} $@ | grep -v "\[ERROR\]"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -