Make sure watching doesn't stop if build fails
This commit is contained in:
parent
1f2ecfc8c1
commit
e030a43db4
1 changed files with 4 additions and 4 deletions
|
@ -157,17 +157,17 @@
|
|||
trap "rm \"''${builddir}\" -rf; exit 0" SIGINT SIGTERM
|
||||
if [ -e book.pdf ]
|
||||
then
|
||||
time=$(stat -c %Y book.pdf)
|
||||
time=$(stat -c %Y book.pdf)
|
||||
else
|
||||
time=$(date "+%s")
|
||||
build "''${builddir}"
|
||||
time=$(date "+%s")
|
||||
build "''${builddir}" || ${pkgs.libnotify}/bin/notify-send "Build failed"
|
||||
fi
|
||||
while true
|
||||
do
|
||||
while [ "$time" -lt "$(stat -c %Y book.org)" ]
|
||||
do
|
||||
time=$(date "+%s")
|
||||
build "''${builddir}"
|
||||
build "''${builddir}" || ${pkgs.libnotify}/bin/notify-send "Build failed"
|
||||
done
|
||||
time=$(date "+%s")
|
||||
echo "Waiting for change..."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue