watchexec/check-hashes.jaq
Félix Saparelli 48bcf237af
wip
2024-04-20 17:56:15 +12:00

15 lines
285 B
Text

# vim: ft=jq
def has_changed:
. as $file |
file_hash |
{ prev: kv_fetch($file), cur: (. | kv_store($file)) } |
.prev != .cur
;
if any(.tags[]; .kind == "path") then
any(
.tags[] | select((.kind == "path") and (.filetype == "file"));
.absolute | has_changed
)
else true end