aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-06-16 23:43:49 -0300
committerEuAndreh <eu@euandre.org>2021-06-16 23:43:49 -0300
commitdb34a348e6418139fed02f68785f38157ec7c557 (patch)
treebd44cf9f2dcfd69bbe5d839439387f018c90581b
parent4a4b730e44e6a614cb7070aa7526b1442cffefaf (diff)
downloadautoqemu-db34a348e6418139fed02f68785f38157ec7c557.tar.gz
Makefile: run assert-{readme,manpages}.sh and adjust accordingly
-rw-r--r--Makefile4
-rw-r--r--README.md44
-rw-r--r--aux/workflow/assert-manpages.sh70
-rw-r--r--doc/autoqemu.147
4 files changed, 143 insertions, 22 deletions
diff --git a/Makefile b/Makefile
index ed8ecbb..1e464ac 100644
--- a/Makefile
+++ b/Makefile
@@ -34,8 +34,10 @@ check:
dev-check: check
sh aux/assert-shellcheck.sh
- sh aux/workflow/assert-changelog.sh $(NAME_UC) $(NAME)
sh aux/workflow/assert-todos.sh
+ sh aux/workflow/assert-changelog.sh $(NAME_UC) $(NAME)
+ sh aux/workflow/assert-readme.sh $(NAME) $(MAILING_LIST)
+ sh aux/workflow/assert-manpages.sh $(NAME) $(MAILING_LIST)
do_subst = sed \
-e 's:[@]VERSION[@]:$(VERSION):g' \
diff --git a/README.md b/README.md
index 22e39fc..f5a9d3c 100644
--- a/README.md
+++ b/README.md
@@ -26,3 +26,47 @@ The required dependencies are:
## Documentation
Documentation is available via installed man pages or online: [`autoqemu.1`](https://autoqemu.euandreh.xyz/autoqemu.1.html).
+
+
+## Contributing
+
+Extra tools used for development are:
+- [ShellCheck] for validating scripts;
+- [pandoc] and Perl for generating the documentation HTML and website.
+
+[ShellCheck]: https://www.shellcheck.net/
+[pandoc]: https://pandoc.org/
+
+
+For running the extra development-only checks, run:
+
+```shell
+$ make dev-check
+```
+
+and for generating the documentation HTML and website, run:
+
+```shell
+$ make public
+```
+
+Send contributions to the [mailing list] via [`git send-email`](https://git-send-email.io/).
+
+
+## Links
+
+- [homepage](https://euandreh.xyz/autoqemu/)
+- [source code](https://git.euandreh.xyz/autoqemu/)
+- [bug tracking](https://euandreh.xyz/autoqemu/TODOs.html)
+- [mailing list]
+- [CI logs](https://euandreh.xyz/autoqemu/ci.html)
+- [CHANGELOG](https://euandreh.xyz/autoqemu/CHANGELOG.html)
+
+[mailing list]: https://lists.sr.ht/~euandreh/standardify?search=%5Bautoqemu%5D
+
+
+## License
+
+The code is licensed under [GNU Affero General Public License v3.0 or later][AGPL-3.0-or-later] (AGPL-3.0-or-later).
+
+[AGPL-3.0-or-later]: https://git.euandreh.xyz/autoqemu/tree/COPYING
diff --git a/aux/workflow/assert-manpages.sh b/aux/workflow/assert-manpages.sh
new file mode 100644
index 0000000..f265ab4
--- /dev/null
+++ b/aux/workflow/assert-manpages.sh
@@ -0,0 +1,70 @@
+#!/bin/sh
+set -eu
+
+PROJECT="$1"
+MAILING_LIST="$2"
+shift
+shift
+TLD="$(cat aux/tld.txt)"
+
+IN_PLACE=false
+while getopts 'i' flag; do
+ case "$flag" in
+ i)
+ IN_PLACE=true
+ ;;
+ *)
+ ;;
+ esac
+done
+
+EXPECTED="$(mktemp)"
+cat <<EOF >> "$EXPECTED"
+
+
+.SH AUTHORS
+
+.MT eu@euandre.org
+EuAndreh
+.ME
+and contributors.
+
+
+.SH BUGS
+
+.IP \(bu
+Report bugs to the
+.MT ~euandreh/$MAILING_LIST@lists.sr.ht
+mailing list
+.ME .
+Use the subject "\fC[$PROJECT] BUG or TASK: <description>\fR".
+.IP \(bu
+Browse bugs
+.UR https://$TLD/$PROJECT/TODOs.html
+online
+.UE .
+.IP \(bu
+.UR https://$TLD/$PROJECT/
+Homepage
+.UE .
+.IP \(bu
+.UR https://lists.sr.ht/~euandreh/$MAILING_LIST?search=%5B$PROJECT%5D
+Comments and discussions
+.UE .
+EOF
+
+# shellcheck disable=2044
+for f in $(find doc -type f -name '*.[0-9]'); do
+ LINES="$(wc -l "$f" | cut -d\ -f1)"
+ if [ "$LINES" = 1 ] && grep -Eq '^\.so man.+$' "$f"; then
+ continue
+ fi
+ if ! tail -n "$(wc -l < "$EXPECTED")" "$f" | diff - "$EXPECTED"; then
+ echo "Missing metadata at the end of \"$f\" file"
+ if [ "$IN_PLACE" = true ]; then
+ cat "$EXPECTED" >> "$f"
+ else
+ exit 1
+ fi
+ fi
+done
diff --git a/doc/autoqemu.1 b/doc/autoqemu.1
index 43a7a50..4f1d84d 100644
--- a/doc/autoqemu.1
+++ b/doc/autoqemu.1
@@ -226,29 +226,34 @@ Show the list of default values, including the overrides.
\fBqemu\fR(1)
\fBqemu-img\fR(1)
\fBexpect\fR(1)
-.
-.
+
+
.SH AUTHORS
-.P
-EuAndreh
+
.MT eu@euandre.org
+EuAndreh
.ME
and contributors.
-.
-.
+
+
.SH BUGS
-Report bugs to:
-.MT ~euandreh/public-inbox@lists.sr.ht
-.ME
-.br
-Browse bugs at:
-.UR https://autoqemu.euandreh.xyz/TODOs.html
-.UE
-.br
-Home page:
-.UR https://autoqemu.euandreh.xyz
-.UE
-.br
-Discussions:
-.UR https://lists.sr.ht/~euandreh/public-inbox?search=[autoqemu]
-.UE
+
+.IP \(bu
+Report bugs to the
+.MT ~euandreh/standardify@lists.sr.ht
+mailing list
+.ME .
+Use the subject "\fC[autoqemu] BUG or TASK: <description>\fR".
+.IP \(bu
+Browse bugs
+.UR https://euandreh.xyz/autoqemu/TODOs.html
+online
+.UE .
+.IP \(bu
+.UR https://euandreh.xyz/autoqemu/
+Homepage
+.UE .
+.IP \(bu
+.UR https://lists.sr.ht/~euandreh/standardify?search=%5Bautoqemu%5D
+Comments and discussions
+.UE .