I want to:
- Run a script which never exits, this will produce a file
- Run a script which watches for this file and then exits
- Run the final script which also never exits (which depends on the first one's output)
I've seen this answer: Run commands in parallel and wait for one group of commands to finish before starting the next but I don't think my requirements are the same since the first script will never exit.
# This runs continuously
nps $DEV_SCRIPT &
# How can I not run the final parallel script until this exits?
node ./scripts/waitForAssetManifest.js &
wait
# This also runs continuously
node-dev build/lib/index.js