# HG changeset patch # User Franz Glasner # Date 1730294235 -3600 # Node ID 3e775a9390afeed8d1fe5bed625a08098954cf55 # Parent 3b5a59b0840d06f8a54e03954d9d286a6188ca21 common.subr: Docs diff -r 3b5a59b0840d -r 3e775a9390af share/local-bsdtools/common.subr --- a/share/local-bsdtools/common.subr Wed Oct 30 14:15:59 2024 +0100 +++ b/share/local-bsdtools/common.subr Wed Oct 30 14:17:15 2024 +0100 @@ -26,17 +26,17 @@ # shellcheck disable=SC2034 # seems unused EX_OK=0 -# shellcheck disable=SC2034 +# shellcheck disable=SC2034 EX_BASE=64 -# shellcheck disable=SC2034 +# shellcheck disable=SC2034 EX_USAGE=$((EX_BASE + 0)) -# shellcheck disable=SC2034 +# shellcheck disable=SC2034 EX_DATAERR=$((EX_BASE + 1)) -# shellcheck disable=SC2034 +# shellcheck disable=SC2034 EX_NOINPUT=$((EX_BASE + 2)) -# shellcheck disable=SC2034 +# shellcheck disable=SC2034 EX_UNAVAILABLE=$((EX_BASE + 5)) -# shellcheck disable=SC2034 +# shellcheck disable=SC2034 EX_SOFTWARE=$((EX_BASE + 6)) # shellcheck disable=SC2034 EX_TEMPFAIL=$((EX_BASE + 12)) @@ -109,7 +109,7 @@ #: Test $1 variable, and warn if not set to YES or NO. #: #: Args: -#: $1 (str): the name of the variable to test to +#: $1 (str): The name of the variable to test to. #: #: Returns: #: int: 0 (truthy) iff ``yes`` (et al), @@ -118,6 +118,8 @@ #: This function warns if other than proper YES/NO values are found. #: checkyesno() { + # $1 + local _value eval _value=\"\$\{"${1}"\}\" @@ -142,7 +144,7 @@ #: Test $1 variable whether it is set to YES. #: #: Args: -#: $1 (str): the name of the variable to test to +#: $1 (str): The name of the variable to test to. #: #: Returns: #: int: 0 (truthy) iff ``yes`` (et al), @@ -152,6 +154,8 @@ #: contains other values as YES. #: checkyes() { + # $1 + local _value eval _value=\"\$\{"${1}"\}\"