Last active
August 29, 2015 14:11
-
-
Save dynnamitt/b002b25fc1e5cea1c0be to your computer and use it in GitHub Desktop.
Run CMD in an inotify loop, restarting inotifywait each time to ensure new dirs get hooked in. Runs on $PWD
This file contains 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/sh | |
#function for yo .bashrc/.zshrc | |
inotify_delay_cmd() { | |
while true; do | |
inotifywait -r -e create -e delete -e modify --exclude '^\./\..+' . | |
"$@" | |
done | |
} | |
# usage: | |
# $ cd my-code; inotify_delay_cmd ctags -R | |
# $ cd my-code-2; inotify_delay_cmd make |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
apt-get install inotify-tools