Skip to content

Instantly share code, notes, and snippets.

@senventise
Created April 22, 2023 12:59
Show Gist options
  • Save senventise/acb8b3424ae18869d26f204f53958df4 to your computer and use it in GitHub Desktop.
Save senventise/acb8b3424ae18869d26f204f53958df4 to your computer and use it in GitHub Desktop.
Auto re-run a script when its content is modified (and saved).
#!/bin/fish
set SCRIPT_PATH "/path/to/script.py"
set EXEC_PATH /bin/python
while true
inotifywait -e modify $SCRIPT_PATH && $EXEC_PATH $SCRIPT_PATH
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment