From: Alejandro Colomar <alx.manpages@gmail.com>
To: mtk.manpages@gmail.com
Cc: Alejandro Colomar <alx.manpages@gmail.com>,
linux-man@vger.kernel.org,
"G . Branden Robinson" <g.branden.robinson@gmail.com>,
nab <nabijaczleweli@nabijaczleweli.xyz>
Subject: [PATCH 2/3] scripts/append_COLOPHON.sh: Add script to append the COLOPHON section
Date: Sat, 16 Apr 2022 01:30:47 +0200 [thread overview]
Message-ID: <20220415233048.70477-3-alx.manpages@gmail.com> (raw)
In-Reply-To: <20220415233048.70477-1-alx.manpages@gmail.com>
I first implemented it using cat <<-, but sed(1) is around 5 times
faster, so even if it's a bit more complex and slightly less
readable, let's use sed(1).
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
scripts/append_COLOPHON.sh | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100755 scripts/append_COLOPHON.sh
diff --git a/scripts/append_COLOPHON.sh b/scripts/append_COLOPHON.sh
new file mode 100755
index 000000000..f277b997f
--- /dev/null
+++ b/scripts/append_COLOPHON.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+#
+# append_COLOPHON.sh
+#
+# Append the COLOPHON section to the man pages. This script should be
+# run before running `make dist`.
+#
+########################################################################
+# SPDX-License-Identifier: GPL-2.0-only
+########################################################################
+#
+# (C) Copyright 2022, Alejandro Colomar
+# These functions are free software; you can redistribute them and/or
+# modify them under the terms of the GNU General Public License
+# as published by the Free Software Foundation; version 2.
+#
+# These functions are distributed in the hope that they will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details
+# (http://www.gnu.org/licenses/gpl-2.0.html).
+#
+########################################################################
+find man?/ -not -type d \
+|xargs sed -i "\$a \\
+.SH COLOPHON\\
+This page is part of release\\
+$(git describe | sed 's/^man-pages-//')\\
+of the Linux\\
+.I man-pages\\
+project.\\
+A description of the project,\\
+information about reporting bugs,\\
+and the latest version of this page,\\
+can be found at\\
+.UR https://www.kernel.org/doc/man-pages/\\
+.UE .
+"
--
2.30.2
next prev parent reply other threads:[~2022-04-15 23:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-15 23:30 [RFC 0/3] Prepare the Makefile and scripts/ for releasing Alejandro Colomar
2022-04-15 23:30 ` [PATCH 1/3] scripts/remove_COLOPHON.sh: Allow passing directories to the script Alejandro Colomar
2022-04-15 23:30 ` Alejandro Colomar [this message]
2022-04-15 23:30 ` [PATCH 3/3] Makefile: dist: Add target to create distribution archives Alejandro Colomar
2022-04-16 13:02 ` [RFC v3 " Alejandro Colomar
2022-04-15 23:33 ` [RFC 0/3] Prepare the Makefile and scripts/ for releasing Alejandro Colomar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220415233048.70477-3-alx.manpages@gmail.com \
--to=alx.manpages@gmail.com \
--cc=g.branden.robinson@gmail.com \
--cc=linux-man@vger.kernel.org \
--cc=mtk.manpages@gmail.com \
--cc=nabijaczleweli@nabijaczleweli.xyz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox