texpdf (342B)
1 #!/bin/sh 2 3 usage() { 4 echo "usage: ${0##*/} [-b] file" 1>&2 && exit 1 5 } 6 7 file_exists() { 8 test ! -f "${1}.tex" && echo "${1}.tex: file not found" && exit 1 9 } 10 11 test ${#} -eq 0 && usage 12 if [ ${1} = "-b" ]; then 13 file_exists "${2}" 14 pdflatex ${2}.tex && biber ${2} && pdflatex ${2}.tex -o ${2}.pdf 15 else 16 file_exists "${1}" 17 pdflatex ${1}.tex 18 fi