3 ms·
ifnotifywait doesn't exist on macOS, so in addition to that not being an option on macos, this would be something you could write tools that a team who used mul
by masukomi 4y ago
ifnotifywait doesn't exist on macOS, so in addition to that not being an option on macos, this would be something you could write tools that a team who used multiple platforms, or a person with setups on multiple os's, could use. I suspect this might even be usable on windows.
[edit: fswatch looks very promising, and may be a better choice than either ifnotifywait or watchman]
- IncRnd 4y agoYou are confused about how the tool works. This project uses inotifywait from inotify tools to reimplement what inotifywait already does. The linked article page at github clearly says this. Adding a new layer atop inotify tools doesn't make that package automatically run on new platforms. There are already tools on macos that use the native FSEvents API for watching for file changes and executing scripts.
- awinder 4y agoThis wraps inotifywait, so it doesn’t really address cross-platform needs. The unique features in this over straight inotifywait is plugging together the command you want to execute, and some event dedupe logic. Grand majority of the code is around colorized logs, command docs, and some options handling code which mostly just gets piped to inotifywait.
- wwweston 4y agoDiscovered fswatch recently, it's proved very useful, my favorite use being replacing a few situations where I was using sshfs with fswatch+rsync: no network lag on save/load, can even work offline, but everything still makes its way to the network destination!
- brigandish 4y agoThis one? https://github.com/emcrisostomo/fswatch https://github.com/emcrisostomo/fswatch
- williamcotton 4y agoI've been using fswatch for a project that supports both linux and darwin. Here's an example from a Makefile of how I use it to re-run tests on file change: test-watch: make --no-print-directory test || : fswatch --event Updated -o test/*.c test/*.h src/ | xargs -n1 -I{} make --no-print-directory test