Watching for hash changes #807
Answered
by
musjj
musjj
asked this question in
Questions & Help
-
While waiting for #571 to be merged, are there any alternative solutions for watching for file hash changes? I tried exporting shell functions and calling it from |
Beta Was this translation helpful? Give feedback.
Answered by
musjj
Mar 25, 2024
Replies: 1 comment 1 reply
-
You can use the JSON event stream mode and a second watchexec instance triggered on signals, or store global state in a file, or use xattrs to store per-file hashes, etc. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I ended up using signals instead:
watchexec will send a signal to the script itself every time it is triggered. The nice thing here is that you can keep state (e.g. global variables) inbetween runs.