Possible Duplicate:
Watch Filesystem in Real Time on OS X and Ubuntu
I'm looking for a efficient method to monitor a local directory in OSX and if any files have been changed in that directory run a bash script to commit the files to github.
Any recommend tools for monitoring a directory for file changes, then triggering an action, i.e. a bash script?
Answer
Using fswatch from your repository:
fswatch . 'git commit -avm "snapshot at ${date}"'
This simple example would only catch changes to files already in the repository.
No comments:
Post a Comment