Fix build-forever (entr is buggy, yo)

This commit is contained in:
Jérôme Petazzoni
2017-10-14 14:19:21 +02:00
parent 9450ed2057
commit 8b0173bc87

View File

@@ -14,7 +14,12 @@ forever)
STTY=$(stty -g)
while true; do
find . | entr -d $0 once
[ $? = 2 ] || break
STATUS=$?
case $STATUS in
2) echo "Directory has changed. Restarting.";;
130) echo "SIGINT or q pressed. Exiting."; break;;
*) echo "Weird exit code: $STATUS. Retrying in 1 second."; sleep 1;;
esac
done
stty $STTY
;;