summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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