Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
changeset 794:3e775a9390af
common.subr: Docs
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 30 Oct 2024 14:17:15 +0100 |
| parents | 3b5a59b0840d |
| children | 77da00746485 |
| files | share/local-bsdtools/common.subr |
| diffstat | 1 files changed, 12 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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}"\}\"
