Created
February 6, 2015 15:14
-
-
Save jonaslindmark/df541a7132930d14f2ed to your computer and use it in GitHub Desktop.
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 | |
# usage ./notify.sh [path to folder] [command line to execute on change] | |
while true | |
do | |
set -e | |
inotifywait -q -r --exclude ".git|.idea" -e close_write,moved_to,create $1 > /dev/null | |
set +e | |
eval ${*:2} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment