first commit
This commit is contained in:
18
pages/Scripts/Script_ Re Run.md
Normal file
18
pages/Scripts/Script_ Re Run.md
Normal file
@@ -0,0 +1,18 @@
|
||||
title:: Script: Re Run
|
||||
updated:: 2022-08-15 12:55:30+00:00
|
||||
created:: 2022-08-15 12:55:30+00:00
|
||||
source:: https://news.ycombinator.com/item?id=32467957
|
||||
|
||||
I use this script, saved as \`rerun\`, to automatically re-execute a command whenever a file in the current directory changes:
|
||||
|
||||
```bash
|
||||
#!/usr/bin/sh
|
||||
|
||||
while true; do
|
||||
reset;
|
||||
\"$@\";
|
||||
inotifywait -e MODIFY --recursive .
|
||||
done
|
||||
```
|
||||
|
||||
For example, if you invoke \`rerun make test\` then \`rerun\` will run \`make test\` whenever you save a file in your editor.
|
||||
Reference in New Issue
Block a user