summaryrefslogtreecommitdiffstats
path: root/scripts/update-docs.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 19:41:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 19:41:32 +0000
commitf26f66d866ba1a9f3204e6fdfe2b07e67b5492ad (patch)
treec953c007cbe4f60a147ab62f97937d58abb2e9ca /scripts/update-docs.sh
parentInitial commit. (diff)
downloadnvme-cli-f26f66d866ba1a9f3204e6fdfe2b07e67b5492ad.tar.xz
nvme-cli-f26f66d866ba1a9f3204e6fdfe2b07e67b5492ad.zip
Adding upstream version 2.8.upstream/2.8
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/update-docs.sh')
-rwxr-xr-xscripts/update-docs.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/update-docs.sh b/scripts/update-docs.sh
new file mode 100755
index 0000000..6fe1132
--- /dev/null
+++ b/scripts/update-docs.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+cd "$(git rev-parse --show-toplevel)" || exit 1
+
+BUILDDIR="$(mktemp -d)"
+trap 'rm -rf -- $BUILDDIR' EXIT
+
+meson setup \
+ -Ddocs=all \
+ -Ddocs-build=true \
+ --force-fallback-for=libnvme \
+ "${BUILDDIR}"
+meson compile -C "${BUILDDIR}"
+find "${BUILDDIR}/Documentation" -maxdepth 1 \
+ \( -name '*.1' -o -name '*.html' \) \
+ -exec cp {} Documentation/ \;