[PATCH 3/8] tools/build-docs-container: build in separate directory for each distro

Antonin Godard
2025-12-22T12:28:21Z

This allows to compare build output from different distros if necessary
and make it easier to make sure we start building from a clean slate.

Co-developed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
documentation/tools/build-docs-container | 2 ++
1 file changed, 2 insertions(+)

diff --git a/documentation/tools/build-docs-container b/documentation/tools/build-docs-container
index 2f31295ed..b377777ed 100755
--- a/documentation/tools/build-docs-container
+++ b/documentation/tools/build-docs-container
@@ -76,6 +76,7 @@ main ()
fi

local image="$1"
+ local orig_image=$image
shift

OCI=$(which "$CONTAINERCMD")
@@ -181,6 +182,7 @@ main ()
--volume="$DOCS_DIR:/docs:rw"
--workdir=/docs
--security-opt label=disable
+ --env BUILDDIR="_build/$orig_image-$image_sha"
)

if [ "$(basename "$OCI")" = "docker" ]; then

--
2.51.0