Files
mgmt/test/test-docs-generate.sh
Karpfen 7e8ced534f misc: Use /usr/bin/env for a more generic shebang
Use path based SHELL in Makefiles. It was suggested that this is a
better solution for make for cases when there is no /usr/bin/env.

See: https://github.com/purpleidea/mgmt/pull/694#discussion_r1015596204
2025-03-22 14:53:21 -04:00

24 lines
467 B
Bash
Executable File

#!/usr/bin/env bash
# check that our documentation still generates, even if we don't use it here
# shellcheck disable=SC1091
. test/util.sh
echo running "$0"
ROOT=$(dirname "${BASH_SOURCE}")/..
cd "${ROOT}"
failures=''
run-test ./mgmt docs generate --output /tmp/docs.json &> /dev/null || fail_test "could not generate: $file"
if [[ -n "$failures" ]]; then
echo 'FAIL'
echo "The following tests have failed:"
echo -e "$failures"
echo
exit 1
fi
echo 'PASS'