summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/php.eselect.in')
-rw-r--r--src/php.eselect.in16
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}"
}