mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-07-20 21:39:22 +00:00
Fix build-forever (entr is buggy, yo)
This commit is contained in:
@@ -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
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user