Rig: move the tree after phase-1 was signed off

This commit is contained in:
2026-08-29 19:23:17 +04:00
parent f5d8f90b0e
commit 1f07b89c2c
+29 -1
View File
@@ -10,6 +10,14 @@ selftest_present test_healthcheck_present readme_present
no_crlf_line_endings no_tabs_in_scripts no_crlf_line_endings no_tabs_in_scripts
shebang_is_bash usage_text_mentions_every_flag" shebang_is_bash usage_text_mentions_every_flag"
# check_exists <name>: true when <name> is one of the CHECKS names.
check_exists() {
case " $(printf '%s ' $CHECKS) " in
*" $1 "*) return 0 ;;
esac
return 1
}
# name=ok / name=fail pairs, in run order. # name=ok / name=fail pairs, in run order.
RESULTS= RESULTS=
FAILED=0 FAILED=0
@@ -103,8 +111,16 @@ main() {
local timing= local timing=
local strict= local strict=
local unknown= local unknown=
local only=
local expect_only=
for arg in "$@"; do for arg in "$@"; do
if [ "$arg" = --help ]; then if [ -n "$expect_only" ]; then
only=$arg
expect_only=
continue
elif [ "$arg" = --only ]; then
expect_only=1
elif [ "$arg" = --help ]; then
usage text usage text
exit 0 exit 0
elif [ "$arg" = --list-checks ]; then elif [ "$arg" = --list-checks ]; then
@@ -128,6 +144,16 @@ main() {
fi fi
done done
if [ -n "$expect_only" ]; then
printf -- '--only requires a check name\n' >&2
exit 2
fi
if [ -n "$only" ] && ! check_exists "$only"; then
printf 'unknown check: %s\n' "$only" >&2
exit 2
fi
if [ -n "$strict" ] && [ -n "$unknown" ]; then if [ -n "$strict" ] && [ -n "$unknown" ]; then
printf 'unknown flag: %s\n' "$unknown" >&2 printf 'unknown flag: %s\n' "$unknown" >&2
exit 2 exit 2
@@ -180,3 +206,5 @@ main() {
} }
main "$@" main "$@"
# Rig: an operator edit made after phase-1 was signed off.