exec prevents the cleanup trap from hitting

This commit is contained in:
Juliano Solanho 2020-11-09 12:03:04 -03:00
parent 038f6885bb
commit d4ce490756

View File

@ -27,9 +27,10 @@ EOF
./script/serve.sh public &
SERVER_PID=$!
cleanup() {
echo "hi"
kill "$SERVER_PID"
}
trap cleanup EXIT INT
# start a watcher. This loops forever, so we don't need to loop ourselves.
exec watchexec --clear --postpone -- shake --compact "$SHAKE_TARGET"
watchexec --clear --postpone -- shake --compact "$SHAKE_TARGET"