Last active
June 15, 2021 16:29
-
-
Save frullah/15682de6caff287868f41aeb2851ee15 to your computer and use it in GitHub Desktop.
auto reload code using inotifywait
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
files_to_watch=$@ | |
file_to_run=$1 | |
inotifywait -e close_write $files_to_watch -m | while read file _event; do bundle exec ruby $file_to_run; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment