Added timeout of 5 since latest file change
This commit is contained in:
18
watch.sh
18
watch.sh
@@ -30,6 +30,16 @@ stop() {
|
|||||||
kill $(pidof TheAdversary)
|
kill $(pidof TheAdversary)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
process() {
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
cp -rf frontend/ backend/ out/
|
||||||
|
build
|
||||||
|
echo "Restarting"
|
||||||
|
stop
|
||||||
|
start &
|
||||||
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
init
|
init
|
||||||
cp -rf frontend/ backend/ out/
|
cp -rf frontend/ backend/ out/
|
||||||
@@ -39,10 +49,10 @@ main() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
while inotifywait -r -e modify frontend/ backend/; do
|
while inotifywait -r -e modify frontend/ backend/; do
|
||||||
cp -rf frontend/ backend/ out/
|
if [ -d /proc/$! ]; then
|
||||||
build
|
kill $!
|
||||||
stop
|
fi
|
||||||
start &
|
process &
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user