commit: 32f6c1c424df3e8f7ed9705323e2911ee43b7696
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 22 02:11:54 2016 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Fri Jan 22 02:11:54 2016 +0000
URL: https://gitweb.gentoo.org/proj/eselect-php.git/commit/?id=32f6c1c4
Clean up and document find_targets().
src/php.eselect.in.in | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/src/php.eselect.in.in b/src/php.eselect.in.in
index 0c83de7..e1edb42 100644
--- a/src/php.eselect.in.in
+++ b/src/php.eselect.in.in
@@ -214,15 +214,17 @@ update_sapi() {
set_$sapi $target
}
-find_targets() {
- local dirs
-
- for dir in "@libdir@"/php*.*; do
- t=$(basename $dir)
- has $t $dirs || dirs="${dirs} $t"
- done
- echo $dirs
+#
+# Find all valid target names by searching libdir for directories like
+# php5.6, php7.0, etc.
+#
+# OUTPUT:
+#
+# A space-separated list of target names, for example, "php5.6 php7.0".
+#
+find_targets() {
+ cd "@LIBDIR@" && echo php*.*
}
# List all valid targets for the given SAPI. The list is obtained by