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