summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2016-01-21 21:11:54 -0500
committerMichael Orlitzky <mjo@gentoo.org>2016-01-21 21:11:54 -0500
commit32f6c1c424df3e8f7ed9705323e2911ee43b7696 (patch)
tree2fb1a946a47ba909c4186b6fc6c7dfeb8cdf53e7 /src/php.eselect.in.in
parentReplace get_libdirs() and get_active_libdir() with autotools magic. (diff)
downloadeselect-php-32f6c1c424df3e8f7ed9705323e2911ee43b7696.tar.gz
eselect-php-32f6c1c424df3e8f7ed9705323e2911ee43b7696.tar.bz2
eselect-php-32f6c1c424df3e8f7ed9705323e2911ee43b7696.zip
Clean up and document find_targets().
Diffstat (limited to 'src/php.eselect.in.in')
-rw-r--r--src/php.eselect.in.in18
1 files 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