diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2016-01-08 21:13:41 -0500 |
---|---|---|
committer | Michael Orlitzky <mjo@gentoo.org> | 2016-01-08 21:13:41 -0500 |
commit | d4fe480eed309b82de1a2370ac85ae1d2367f17d (patch) | |
tree | 72759b022c062361abc9813b842bbe57a805215f /src | |
parent | Remove superfluous list_foo() functions. (diff) | |
download | eselect-php-d4fe480eed309b82de1a2370ac85ae1d2367f17d.tar.gz eselect-php-d4fe480eed309b82de1a2370ac85ae1d2367f17d.tar.bz2 eselect-php-d4fe480eed309b82de1a2370ac85ae1d2367f17d.zip |
Clean up check_module() a bit and give it some documentation.
Diffstat (limited to 'src')
-rw-r--r-- | src/php.eselect.in | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/php.eselect.in b/src/php.eselect.in index 26c43d8..d19b93a 100644 --- a/src/php.eselect.in +++ b/src/php.eselect.in @@ -382,8 +382,22 @@ resolv_target() { fi } + +# Die if the given module name is not valid. +# +# INPUT: +# +# A module name. +# +# OUTPUT: +# +# None; the function will die() if the given module name is invalid +# (that is, not one of our declared $MODULES), and do nothing +# otherwise. +# check_module() { - has $1 $(echo $MODULES) || \ + local module="${1}" + has "${module}" $MODULES || \ die -q "Please choose one of the following modules: ${MODULES}" } |