From 1314a2738823fb4a66c7a7132d5aaf6bf1a78c3b Mon Sep 17 00:00:00 2001 From: fluorescent_haze Date: Fri, 6 May 2022 11:59:47 +0000 Subject: [PATCH] doc/*: add man pages --- Makefile | 13 +++- doc/tinyramfs.5 | 176 ++++++++++++++++++++++++++++++++++++++++++++ doc/tinyramfs.5.scd | 128 ++++++++++++++++++++++++++++++++ doc/tinyramfs.8 | 84 +++++++++++++++++++++ doc/tinyramfs.8.scd | 60 +++++++++++++++ 5 files changed, 460 insertions(+), 1 deletion(-) create mode 100644 doc/tinyramfs.5 create mode 100644 doc/tinyramfs.5.scd create mode 100644 doc/tinyramfs.8 create mode 100644 doc/tinyramfs.8.scd diff --git a/Makefile b/Makefile index 8786b46..8efba96 100644 --- a/Makefile +++ b/Makefile @@ -2,22 +2,33 @@ PREFIX = /usr/local BINDIR = ${PREFIX}/bin +MANDIR = ${PREFIX}/share/man LIBDIR = ${PREFIX}/lib install: mkdir -p ${DESTDIR}${BINDIR} mkdir -p ${DESTDIR}${LIBDIR}/tinyramfs + mkdir -p ${DESTDIR}${MANDIR}/man5 + mkdir -p ${DESTDIR}${MANDIR}/man8 cp -f tinyramfs ${DESTDIR}${BINDIR}/ cp -f lib/init.sh ${DESTDIR}${LIBDIR}/tinyramfs/ cp -f lib/helper.sh ${DESTDIR}${LIBDIR}/tinyramfs/ cp -f lib/common.sh ${DESTDIR}${LIBDIR}/tinyramfs/ + cp -f doc/tinyramfs.5 ${DESTDIR}${MANDIR}/man5/ + cp -f doc/tinyramfs.8 ${DESTDIR}${MANDIR}/man8/ cp -R hook ${DESTDIR}${LIBDIR}/tinyramfs/hook.d uninstall: rm -f ${DESTDIR}${BINDIR}/tinyramfs + rm -f ${DESTDIR}${MANDIR}/man5/tinyramfs.5 + rm -f ${DESTDIR}${MANDIR}/man8/tinyramfs.8 rm -rf ${DESTDIR}${LIBDIR}/tinyramfs check: (cd test && ${MAKE}) -.PHONY: install uninstall check +doc: + scdoc < doc/tinyramfs.5.scd > doc/tinyramfs.5 + scdoc < doc/tinyramfs.8.scd > doc/tinyramfs.8 + +.PHONY: install uninstall check doc diff --git a/doc/tinyramfs.5 b/doc/tinyramfs.5 new file mode 100644 index 0000000..b7e49ca --- /dev/null +++ b/doc/tinyramfs.5 @@ -0,0 +1,176 @@ +.\" Generated by scdoc 1.11.2 +.\" Complete documentation for this program is not available as a GNU info page +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.nh +.ad l +.\" Begin generated content: +.TH "tinyramfs" "5" "2022-05-10" "tinyramfs" "2022-05-09" +.P +.SH NAME +.P +tinyramfs - configuration file +.P +.SH DESCRIPTION +.P +A tinyramfs configuration file is written in POSIX sh.\& Configuration is done +via variable asignment (eg.\& \fBoption=value\fR).\& Special characters and whitespace +must be quoted or escaped, more info: \fBsh\fR(1).\& By default tinyramfs looks to +\fB/etc/tinyramfs/config\fR for a configuration file.\& +.P +.SH OPTIONS +.P +Option marked with \fB(bool)\fR can hold a value of true or false.\& False if the +variable is unset or empty, true otherwise.\& +.P +Some options only apply to certain hooks and have been categorized accordingly.\& +.P +Options which expect a device as a value can also refer to the device via +\fBUUID\fR, \fBLABEL\fR, and \fBPARTUUID\fR (eg.\& LABEL=