summary refs log tree commit diff
path: root/catsit-watch.1
blob: 892fd18d613f6b43ff225cd52b06565eb7664799 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
.Dd February 27, 2021
.Dt CATSIT-WATCH 1
.Os
.
.Sh NAME
.Nm catsit-watch
.Nd run command when files are modified
.
.Sh SYNOPSIS
.Nm
.Op Fl ai
.Op Fl f Ar file
.Ar command ...
.
.Sh DESCRIPTION
The
.Nm
utility runs a command
each time any of a set of files
are modified.
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
.It Fl a
Append the path of
the modified file
to the arguments of
.Ar command .
.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