Skip to content

Instantly share code, notes, and snippets.

@csm
Created January 31, 2015 00:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csm/122be03f5fba6f2bf2cc to your computer and use it in GitHub Desktop.
Save csm/122be03f5fba6f2bf2cc to your computer and use it in GitHub Desktop.
Continuous compilation of Grafana
#!/bin/bash
while true; do
until grunt build; do
fswatch -1 src/
done
grunt server &
new_job_started="$(jobs -n)"
if [ -n "$new_job_started" ];then
server_pid=$!
fswatch -1 -0 src/
kill $server_pid
else
print 'Failed to start server, we exit.'
exit 1
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment