summaryrefslogtreecommitdiffstats
path: root/meson/generate-manpages.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:54:43 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 17:54:43 +0000
commite4283f6d48b98e764b988b43bbc86b9d52e6ec94 (patch)
treec8f7f7a6c2f5faa2942d27cefc6fd46cca492656 /meson/generate-manpages.py
parentInitial commit. (diff)
downloadgnome-shell-e4283f6d48b98e764b988b43bbc86b9d52e6ec94.tar.xz
gnome-shell-e4283f6d48b98e764b988b43bbc86b9d52e6ec94.zip
Adding upstream version 43.9.upstream/43.9upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--meson/generate-manpages.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/meson/generate-manpages.py b/meson/generate-manpages.py
new file mode 100644
index 0000000..e12df61
--- /dev/null
+++ b/meson/generate-manpages.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python3
+
+import os
+from pathlib import PurePath
+import subprocess
+
+man_pages = [
+ 'man/gnome-shell.1',
+ 'subprojects/extensions-tool/man/gnome-extensions.1',
+]
+
+sourceroot = os.environ.get('MESON_SOURCE_ROOT')
+distroot = os.environ.get('MESON_DIST_ROOT')
+
+for man_page in man_pages:
+ page_path = PurePath(man_page)
+ src = PurePath(sourceroot, page_path.with_suffix('.txt'))
+ dst = PurePath(distroot, page_path)
+ stylesheet = src.with_name('stylesheet.xsl')
+
+ subprocess.call(['a2x', '--xsl-file', os.fspath(stylesheet),
+ '--format', 'manpage', '--destination-dir', os.fspath(dst.parent),
+ os.fspath(src)])