commit feab05f7e69fae9129e2201c0d21fbb5170a32ff
parent 01a637890f4ad74ff9d7d62b71a0eed0469ed8e6
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Fri, 3 Oct 2025 19:46:04 +0200
Improve the exit message of "generate man" hooks
Force the tidy command to display the file name relative to the location
where the make command is executed. This helps the user identify the
location of the file.
Diffstat:
4 files changed, 28 insertions(+), 8 deletions(-)
diff --git a/htrdr/hooks/01-generate-man.sh b/htrdr/hooks/01-generate-man.sh
@@ -67,11 +67,16 @@ man_pages | while read -r i; do
dst="man/man${section}/${filename}.html"
man2html "${dst}" < "${i}"
- # Check the result of the HTML conversion
- if ! tidy --show-info no --show-filename yes -qe "${dst}"; then
+ # Check the result of the HTML conversion. Do this operation from the
+ # parent directory so that tidy displays the file name relative to the
+ # location where the make command is invoked. This makes the message
+ # clearer for the user.
+ cd ..
+ if ! tidy --show-info no --show-filename yes -qe "${OLDPWD##*/}/${dst}"; then
>&2 printf '%s: error converting %s\n' "${0##*/}" "${i}"
exit 1
fi
+ cd "${OLDPWD}"
# Write the generated files to standard output to inform the build
# system which files it needs to handle during installation.
diff --git a/schiff/hooks/01-generate-man.sh b/schiff/hooks/01-generate-man.sh
@@ -53,11 +53,16 @@ man_pages | while read -r i; do
dst="man/man${section}/${filename}.html"
man2html "${dst}" < "${i}"
- # Check the result of the HTML conversion
- if ! tidy --show-info no --show-filename yes -qe "${dst}"; then
+ # Check the result of the HTML conversion. Do this operation from the
+ # parent directory so that tidy displays the file name relative to the
+ # location where the make command is invoked. This makes the message
+ # clearer for the user.
+ cd ..
+ if ! tidy --show-info no --show-filename yes -qe "${OLDPWD##*/}/${dst}"; then
>&2 printf '%s: error converting %s\n' "${0##*/}" "${i}"
exit 1
fi
+ cd "${OLDPWD}"
# Write the generated files to standard output to inform the build
# system which files it needs to handle during installation.
diff --git a/solstice/hooks/01-generate-man.sh b/solstice/hooks/01-generate-man.sh
@@ -53,11 +53,16 @@ man_pages | while read -r i; do
dst="man/man${section}/${filename}.html"
man2html "${dst}" < "${i}"
- # Check the result of the HTML conversion
- if ! tidy --show-info no --show-filename yes -qe "${dst}"; then
+ # Check the result of the HTML conversion. Do this operation from the
+ # parent directory so that tidy displays the file name relative to the
+ # location where the make command is invoked. This makes the message
+ # clearer for the user.
+ cd ..
+ if ! tidy --show-info no --show-filename yes -qe "${OLDPWD##*/}/${dst}"; then
>&2 printf '%s: error converting %s\n' "${0##*/}" "${i}"
exit 1
fi
+ cd "${OLDPWD}"
# Write the generated files to standard output to inform the build
# system which files it needs to handle during installation.
diff --git a/stardis/hooks/01-generate-man.sh b/stardis/hooks/01-generate-man.sh
@@ -71,11 +71,16 @@ man_pages | while read -r i; do
dst="man/man${section}/${filename}.html"
man2html "${dst}" < "${i}"
- # Check the result of the HTML conversion
- if ! tidy --show-info no --show-filename yes -qe "${dst}"; then
+ # Check the result of the HTML conversion. Do this operation from the
+ # parent directory so that tidy displays the file name relative to the
+ # location where the make command is invoked. This makes the message
+ # clearer for the user.
+ cd ..
+ if ! tidy --show-info no --show-filename yes -qe "${OLDPWD##*/}/${dst}"; then
>&2 printf '%s: error converting %s\n' "${0##*/}" "${i}"
exit 1
fi
+ cd "${OLDPWD}"
# Write the generated files to standard output to inform the build
# system which files it needs to handle during installation.