Brian Silverman | d736ec6 | 2014-05-10 15:45:35 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # Runs `build.sh all` and then waits for a file to be modified in a loop. |
| 4 | # Useful for making changes to the code while continuously making sure they |
| 5 | # compile. |
| 6 | # Requires the util-linux and inotify-tools packages. |
| 7 | |
| 8 | chrt -i -p 0 $$ |
| 9 | ionice -c 3 -p $$ |
| 10 | |
| 11 | while true; do |
| 12 | $(dirname $0)/build.sh all |
| 13 | echo 'compile_loop.sh: Waiting for a file modification...' 1>&2 |
| 14 | inotifywait -e close_write -r aos frc971 bbb_cape |
| 15 | echo 'compile_loop.sh: Done waiting for a file modification' 1>&2 |
| 16 | done |