From 967da2bbf1b99f05a1a04f9b6786448187a074be Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 8 Jun 2017 20:43:23 +0200 Subject: bin/tex2pdf: Sending SIGHUP to mupdf if it has the pdf open already to only reload. Else open the file anew. --- bin/tex2pdf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/tex2pdf b/bin/tex2pdf index 021682b..64287ae 100755 --- a/bin/tex2pdf +++ b/bin/tex2pdf @@ -79,9 +79,10 @@ function show_pdf() check_mupdf_pid echo "mupdf: ${dirname}/${filename}${output_suffix}." if [ ! -z $mupdf_pid ]; then - kill ${mupdf_pid} + kill -SIGHUP ${mupdf_pid} + else + mupdf ${dirname}/${filename}${output_suffix} & fi - mupdf ${dirname}/${filename}${output_suffix} & } function cleanup() -- cgit v1.2.3-70-g09d2