From e79d66fdd62e06bff773562daa7c29c1cba91bcc Mon Sep 17 00:00:00 2001 From: Franciszek Malinka Date: Sat, 19 Mar 2022 21:02:59 +0100 Subject: Definicje wkolo freissego --- update-pdf.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 update-pdf.sh (limited to 'update-pdf.sh') diff --git a/update-pdf.sh b/update-pdf.sh new file mode 100644 index 0000000..8d1534a --- /dev/null +++ b/update-pdf.sh @@ -0,0 +1,24 @@ +if [[ $# != 1 ]] +then + echo "Usage: $0 [.tex file]" + exit 1 +fi + +PRACA=$1 +if ! [[ -f $PRACA ]] +then + echo "No such file: $PRACA" + exit 1 +fi + +threshold=1 +while true +do + if (($(date +"%s")- $(stat --format="%Y" $PRACA) < $threshold)) + then + echo "updating" + pdflatex $PRACA + else + sleep 0.2 + fi +done -- cgit v1.2.3