Make sure watching doesn't stop if build fails

This commit is contained in:
Charlotte Van Petegem 2024-01-16 12:56:33 +01:00
parent 1f2ecfc8c1
commit e030a43db4
No known key found for this signature in database
GPG key ID: 019E764B7184435A

View file

@ -160,14 +160,14 @@
time=$(stat -c %Y book.pdf) time=$(stat -c %Y book.pdf)
else else
time=$(date "+%s") time=$(date "+%s")
build "''${builddir}" build "''${builddir}" || ${pkgs.libnotify}/bin/notify-send "Build failed"
fi fi
while true while true
do do
while [ "$time" -lt "$(stat -c %Y book.org)" ] while [ "$time" -lt "$(stat -c %Y book.org)" ]
do do
time=$(date "+%s") time=$(date "+%s")
build "''${builddir}" build "''${builddir}" || ${pkgs.libnotify}/bin/notify-send "Build failed"
done done
time=$(date "+%s") time=$(date "+%s")
echo "Waiting for change..." echo "Waiting for change..."