[Goodies-commits] r5337 - thunar-thumbnailers/trunk/tex-thumbnailer
Erlend Davidson
erland at xfce.org
Mon Sep 1 14:32:15 CEST 2008
Author: erland
Date: 2008-09-01 12:32:15 +0000 (Mon, 01 Sep 2008)
New Revision: 5337
Modified:
thunar-thumbnailers/trunk/tex-thumbnailer/tex-thumbnailer
Log:
Fixed TEX thumbnailer
Modified: thunar-thumbnailers/trunk/tex-thumbnailer/tex-thumbnailer
===================================================================
--- thunar-thumbnailers/trunk/tex-thumbnailer/tex-thumbnailer 2008-09-01 11:52:08 UTC (rev 5336)
+++ thunar-thumbnailers/trunk/tex-thumbnailer/tex-thumbnailer 2008-09-01 12:32:15 UTC (rev 5337)
@@ -28,9 +28,11 @@
# the output file will be called ${file}.pdf where ${file}=`basename $ifile .tex`
file=`basename "${ifile}" .tex`
-mkdir "/tmp/${file}"
+dir=`dirname ${ifile}`
+mkdir -p "/tmp/${file}"
tmpfile="/tmp/${file}/${file}.pdf"
+
# check we have \begin{document} and \end{document}
C1=`grep -c "begin{document}" "${ifile}"`
C2=`grep -c "end{document}" "${ifile}"`
@@ -45,6 +47,7 @@
exit 1
fi
+cd "${dir}"
pdflatex -interaction=nonstopmode -output-directory=/tmp/${file} "$ifile"
if [ ! -f ${tmpfile} ]; then
More information about the Goodies-commits
mailing list