mirror of
https://github.com/watchexec/watchexec.git
synced 2024-11-16 00:58:31 +01:00
15 lines
285 B
Text
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
|