Earlier quoted context omitted.
Forking might be easier to debug.. but I think I might have missed some of the functionality in your script.. something like (totally untested): (while true do inotifywait \ --exclude '.*\.sw.' \ --recursive \ --event close_write \ --event delete \ --event moved_to \ --event moved_from \ dir1/ git push sleep 0.1 done ) 2>&1 >/var/log/push_log.log & (while true do cat EOF # (second EOF cannot be indented) done ) 2>&1…
That is Gold! Implementing the functionality in shell itself was what I considered first however I needed two things 1. Make it work on OSX 2. Use a lock file to prevent multiple instances from running when I put this in crontab I found watchman[0]. Got to see if I can use that in place of "inotifywait". [0]: https://facebook.github.io/watchman/docs/install.html
Re: Show HN: Pullbox – A dead-simple dropbox alternative using Git
#31Yeah that should work!