.\" -*-nroff-*- .de hP .IP .ft B \h'-\w'\\$1\ 'u'\\$1\ \c .ft P .. .ie t .ds o \(bu .el .ds o o . .TH splitconf 1 "9 October 2003" "Straylight/Edgeware" .SH NAME splitconf \- break a single configuration file out into small chunks . .SH SYNOPSIS .B splitconf .B \-u .IR config .I file ... .br .B splitconf .B \-d .I config .br .B splitconf .RB [ \-s \] .I config . .SH DESCRIPTION The .B splitconf program breaks a configuration file into lots of small files, and remembers what they are. It is designed to be .IR safe : if writing any of the components fails, none of the files is changed. Alas, the update is not quite atomic -- doing that involves messing with symbolic links and is just too much like hard work. .PP The command-line arguments are as follows: .TP .B \-h, \-\-help Print a very short help message to standard output and exit. .TP .B \-u, \-\-unsplit Gather a list of .IR file s into a single .BR splitconf -managed configuration file .IR config . .TP .B \-d, \-\-delete Delete the files split out from .IR config . .TP .B \-s, \-\-split Split files out from .IR config . (This is the default.) . .SH SPLITCONF FILES The input files to .B splitconf start with a .I preamble section, followed by a number of .I file sections. .PP The preamble section may contain: .hP \*o blank lines, which are ignored; .hP \*o meta-comments, which begin with a .RB ` ## ' pair, and are also ignored; .hP \*o option settings, of the form .RI ` option .B = .IR value ' (see below); and .hP \*o one-liner file contents descriptions, of the form .RI ` name \c .B : .IR contents '. .PP A file section begins with a line of the form .RB ` [ \c .IR name \c .BR ] ' and is followed by lines to write to the file. In these lines, comments (lines beginning with a .RB ` ## ' are stripped out, and any trailing blank lines are removed. Also, any line beginning with an exclamation mark .RB ` ! ' is written out with the leading exclamation mark removed. .PP A file section with an empty .I name is treated specially: its contents are scanned for more preamble directives. .PP Options are as follows. .TP .B prefix A string to attach to the front of all subsequent filenames, until overridden. (Default is empty.) .TP .B before A shell command to execute before starting to write any files. There is only one before-command, which is the one current when the first file is written. .TP .B after A shell command to execute after committing the changes or backing out. There is only one after-command, which is the last one set in the configuration file. .SH BUGS None known. .SH AUTHOR Mark Wooding,