Stephan Witt <st.witt <at> gmx.net> writes: Unfortunately it's not quite there. I have tried to modify the script to run bibtex, but it doesn't work. I have tried different variations for the input to bibtex, below is one. But it's not quite clear to me exactly what should be the input argument to bibtex. It's almost there, so I hope someone can help me.
#!/bin/sh echo $(date)":" "$0" "$ <at> " filename=$(basename "$1" .tex) if [ -d "$2" ]; then targetdir="$2" elif [ -f "$2" ]; then targetdir=$(dirname "$2") else targetdir="$2" if [ ! -d "$2" ]; then echo Bad call with target "$2" exit 1 fi fi echo pwd=$(pwd) filename="$filename" echo pdflatex "$1" "$targetdir"/"$filename".pdf pdflatex "$1" "$targetdir"/"$filename".pdf bibtex “$filename”.aux pdflatex “$1” "$targetdir"/"$filename".pdf pdflatex "$1" && test -f "$filename".pdf && cp "$filename".pdf "$targetdir"/ echo cp "$1" "$targetdir"/"$filename".tex cp "$1" "$targetdir"/"$filename".tex