1 2 3 4 5 6
#!/bin/sh # Execute given command when current dir content changes. trap exit SIGINT while true; do "$@"; fswatch -1 . >/dev/null 2>&1; done