summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2015-12-06 19:37:29 -0500
committerMichael Orlitzky <mjo@gentoo.org>2015-12-06 19:37:29 -0500
commitcb405d1d3a06f0971cb06fd244e0d8b96104d974 (patch)
treed77e9cc15359a90afbf55911f35e785c13e0115b
parentCombine the libphp5/libphp7 branches. (diff)
downloadeselect-php-cb405d1d3a06f0971cb06fd244e0d8b96104d974.tar.gz
eselect-php-cb405d1d3a06f0971cb06fd244e0d8b96104d974.tar.bz2
eselect-php-cb405d1d3a06f0971cb06fd244e0d8b96104d974.zip
Test for sort/uniq executables and use the results instead of "sort -u".0.8.0
-rw-r--r--configure.ac2
-rw-r--r--src/php.eselect.in8
2 files changed, 6 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index b4d19a2..d8f339c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,6 +3,8 @@ AM_INIT_AUTOMAKE([-Wall foreign no-dist-gzip dist-xz])
AC_PROG_LN_S
AC_PROG_SED
+AC_PATH_PROG(SORT,sort)
+AC_PATH_PROG(UNIQ,uniq)
# List of output files.
AC_CONFIG_FILES([Makefile src/php.eselect])
diff --git a/src/php.eselect.in b/src/php.eselect.in
index b729ca2..363dc1d 100644
--- a/src/php.eselect.in
+++ b/src/php.eselect.in
@@ -107,7 +107,7 @@ find_targets_apache2() {
[[ -f "${lib}" ]] && echo $target
done
done
- done | sort -u
+ done | @SORT@ | @UNIQ@
}
find_targets_cli() {
@@ -116,7 +116,7 @@ find_targets_cli() {
for libdir in $(get_libdirs); do
[[ -f ${EROOT}${libdir}/$target/bin/php ]] && echo $target
done
- done | sort -u
+ done | @SORT@ | @UNIQ@
}
find_targets_fpm() {
@@ -125,7 +125,7 @@ find_targets_fpm() {
for libdir in $(get_libdirs); do
[[ -f ${EROOT}${libdir}/$target/bin/php-fpm ]] && echo $target
done
- done | sort -u
+ done | @SORT@ | @UNIQ@
}
find_targets_cgi() {
@@ -134,7 +134,7 @@ find_targets_cgi() {
for libdir in $(get_libdirs); do
[[ -f ${EROOT}${libdir}/$target/bin/php-cgi ]] && echo $target
done
- done | sort -u
+ done | @SORT@ | @UNIQ@
}
get_active_cli() {