make verify: run checks in all module hack directories

This ensures that all verification scripts are run throughout the
repository.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
This commit is contained in:
Stephen Kitt
2024-09-19 15:40:39 +02:00
parent 71c77414d4
commit beb51e1759
2 changed files with 34 additions and 5 deletions

View File

@@ -828,6 +828,18 @@ function kube::util::read-array {
fi
}
# kube::util::run-in
# Changes directory to "$1", runs the rest of the arguments, and restores the initial directory
# Returns 1 if a directory change fails, the result of running the arguments otherwise
function kube::util::run-in {
pushd "$1" > /dev/null || return 1
shift
"$@"
local result=$?
popd > /dev/null || return 1
return $result
}
# Some useful colors.
if [[ -z "${color_start-}" ]]; then
declare -r color_start="\033["