mtimeout.1: Use correct dash for number ranges.
[misc] / splitconf.1
CommitLineData
f342fce2 1.\" -*-nroff-*-
2.de hP
3.IP
4.ft B
5\h'-\w'\\$1\ 'u'\\$1\ \c
6.ft P
7..
8.ie t .ds o \(bu
9.el .ds o o
10.
11.TH splitconf 1 "9 October 2003" "Straylight/Edgeware"
12.SH NAME
13splitconf \- break a single configuration file out into small chunks
14.
15.SH SYNOPSIS
16.B splitconf
17.B \-u
18.IR config
19.I file
20...
21.br
22.B splitconf
23.B \-d
24.I config
25.br
26.B splitconf
27.RB [ \-s \]
28.I config
29.
30.SH DESCRIPTION
31The
32.B splitconf
33program breaks a configuration file into lots of small files, and
34remembers what they are. It is designed to be
35.IR safe :
36if writing any of the components fails, none of the files is changed.
37Alas, the update is not quite atomic -- doing that involves messing with
38symbolic links and is just too much like hard work.
39.PP
40The command-line arguments are as follows:
41.TP
42.B \-h, \-\-help
43Print a very short help message to standard output and exit.
44.TP
45.B \-u, \-\-unsplit
46Gather a list of
47.IR file s
48into a single
49.BR splitconf -managed
50configuration file
51.IR config .
52.TP
53.B \-d, \-\-delete
54Delete the files split out from
55.IR config .
56.TP
57.B \-s, \-\-split
58Split files out from
59.IR config .
60(This is the default.)
61.
62.SH SPLITCONF FILES
63The input files to
64.B splitconf
65start with a
66.I preamble
67section, followed by a number of
68.I file
69sections.
70.PP
71The preamble section may contain:
72.hP \*o
73blank lines, which are ignored;
74.hP \*o
75meta-comments, which begin with a
76.RB ` ## '
77pair, and are also ignored;
78.hP \*o
79option settings, of the form
80.RI ` option
81.B =
82.IR value '
83(see below); and
84.hP \*o
85one-liner file contents descriptions, of the form
86.RI ` name \c
87.B :
88.IR contents '.
89.PP
90A file section begins with a line of the form
91.RB ` [ \c
92.IR name \c
93.BR ] '
94and is followed by lines to write to the file. In these lines, comments
95(lines beginning with a
ed04d555 96.RB ` ## '
f342fce2 97are stripped out, and any trailing blank lines are removed. Also, any
98line beginning with an exclamation mark
99.RB ` ! '
100is written out with the leading exclamation mark removed.
101.PP
ed04d555 102A file section with an empty
103.I name
104is treated specially: its contents are scanned for more preamble
105directives.
106.PP
f342fce2 107Options are as follows.
108.TP
109.B prefix
ed04d555 110A string to attach to the front of all subsequent filenames, until
111overridden. (Default is empty.)
f342fce2 112.TP
113.B before
ed04d555 114A shell command to execute before starting to write any files. There is
115only one before-command, which is the one current when the first file is
116written.
f342fce2 117.TP
118.B after
119A shell command to execute after committing the changes or backing out.
ed04d555 120There is only one after-command, which is the last one set in the
121configuration file.
f342fce2 122.SH BUGS
123None known.
124.SH AUTHOR
71d8432e 125Mark Wooding, <mdw@distorted.org.uk>