From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 7C16E1388C3 for ; Sat, 9 Jan 2016 02:24:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 41380E0817; Sat, 9 Jan 2016 02:24:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 782E9E0810 for ; Sat, 9 Jan 2016 02:24:08 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 78644340A15 for ; Sat, 9 Jan 2016 02:24:07 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 997DDD04 for ; Sat, 9 Jan 2016 02:24:05 +0000 (UTC) From: "Michael Orlitzky" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Orlitzky" Message-ID: <1452305621.d4fe480eed309b82de1a2370ac85ae1d2367f17d.mjo@gentoo> Subject: [gentoo-commits] proj/eselect-php:master commit in: src/ X-VCS-Repository: proj/eselect-php X-VCS-Files: src/php.eselect.in X-VCS-Directories: src/ X-VCS-Committer: mjo X-VCS-Committer-Name: Michael Orlitzky X-VCS-Revision: d4fe480eed309b82de1a2370ac85ae1d2367f17d X-VCS-Branch: master Date: Sat, 9 Jan 2016 02:24:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 37becaa3-ec2d-476f-9aca-036ff9972e73 X-Archives-Hash: ec80b3ef8a74955cc0ff1dbdff09a95a commit: d4fe480eed309b82de1a2370ac85ae1d2367f17d Author: Michael Orlitzky gentoo org> AuthorDate: Sat Jan 9 02:13:41 2016 +0000 Commit: Michael Orlitzky gentoo org> CommitDate: Sat Jan 9 02:13:41 2016 +0000 URL: https://gitweb.gentoo.org/proj/eselect-php.git/commit/?id=d4fe480e Clean up check_module() a bit and give it some documentation. src/php.eselect.in | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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}" }