From 70211d736849e5c1b06971ae1f5465c0a577cb53 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 14 Feb 2023 12:05:30 +0100 Subject: [PATCH] scripts: check-html-references: Rename --prefix to --webroot and make it mandatory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Force users to pass the path to the root of the webpage the script should check. The script lives in a different subdirectory so the default of the current directory doesn't make much sense. Signed-off-by: Peter Krempa Reviewed-by: Daniel P. Berrangé --- docs/meson.build | 2 +- scripts/check-html-references.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/meson.build b/docs/meson.build index 5c0c762db1..5ffd39c01b 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -359,7 +359,7 @@ test( python3_prog, args: [ check_html_references_prog.full_path(), - '--prefix', + '--webroot', meson.project_build_root() / 'docs' ], env: runutf8, diff --git a/scripts/check-html-references.py b/scripts/check-html-references.py index 95a61a6bb4..6d9116585e 100755 --- a/scripts/check-html-references.py +++ b/scripts/check-html-references.py @@ -127,14 +127,14 @@ def check_targets(targets, anchors): parser = argparse.ArgumentParser(description='HTML reference checker') -parser.add_argument('--prefix', default='.', - help='build tree prefix') +parser.add_argument('--webroot', required=True, + help='path to the web root') parser.add_argument('--external', action="store_true", help='print external references instead') args = parser.parse_args() -files = get_file_list(args.prefix) +files = get_file_list(args.webroot) targets, anchors = process_all(files)