catsit/catsit-watch.1

65 lines
1005 B
Groff
Raw Normal View History

2021-02-27 21:44:24 +01:00
.Dd February 27, 2021
2021-02-25 21:42:24 +01:00
.Dt CATSIT-WATCH 1
.Os
.
.Sh NAME
.Nm catsit-watch
.Nd run command when files are modified
.
.Sh SYNOPSIS
.Nm
2021-02-27 21:44:24 +01:00
.Op Fl ai
2021-02-28 01:34:30 +01:00
.Op Fl d Ar delay
2021-02-25 21:42:24 +01:00
.Op Fl f Ar file
.Ar command ...
.
.Sh DESCRIPTION
The
.Nm
utility runs a command
each time any of a set of files
2021-02-28 01:34:30 +01:00
are written to.
2021-02-25 21:42:24 +01:00
If any watched files are removed
or if the command exits non-zero,
.Nm
exits.
.
.Pp
The arguments are as follows:
.Bl -tag -width Ds
2021-02-27 21:44:24 +01:00
.It Fl a
Append the path of
the modified file
to the arguments of
.Ar command .
2021-02-28 01:34:30 +01:00
.It Fl d Ar delay
Wait
.Ar delay
milliseconds before running the command.
Any further writes within that time
do not trigger additional runs.
2021-02-25 21:42:24 +01:00
.It Fl f Ar file
Add
.Ar file
to the set of watched files.
.It Fl i
Run the command once initially,
before watching files.
.El
.
.Sh EXIT STATUS
If any watched files are removed,
.Nm
exits with
.Dv EX_TEMPFAIL
(75).
If the command exits non-zero,
.Nm
exits with the same status.
.
.Sh SEE ALSO
.Xr catsitd 8
.
.Sh AUTHORS
.An June Bug Aq Mt june@causal.agency