diff --git a/contrib/scripts/nm-ci-run.sh b/contrib/scripts/nm-ci-run.sh index 4ac5fd9684..188d631e55 100755 --- a/contrib/scripts/nm-ci-run.sh +++ b/contrib/scripts/nm-ci-run.sh @@ -5,6 +5,7 @@ # - CC # - BUILD_TYPE # - CFLAGS +# - WITH_DOCS set -exv @@ -13,6 +14,20 @@ die() { exit 1 } +_is_true() { + case "$1" in + 1|y|yes|YES|Yes|on) + return 0 + ;; + 0|n|no|NO|No|off) + return 1 + ;; + *) + die "not a boolean argument \"$1\"" + ;; + esac +} + ############################################################################### if [ "$BUILD_TYPE" == meson ]; then @@ -45,6 +60,14 @@ if [ "$CC" != gcc ]; then _WITH_CRYPTO=nss fi +if [ "$WITH_DOCS" != "" ]; then + if _is_true "$WITH_DOCS"; then + _WITH_DOCS="$_TRUE" + else + _WITH_DOCS="$_FALSE" + fi +fi + ############################################################################### _autotools_test_print_logs() {