commit:     80898dea109417f9b8990837a4292ed90018f8d9
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 10 22:35:55 2015 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Thu Dec 10 22:35:55 2015 +0000
URL:        https://gitweb.gentoo.org/proj/eselect-php.git/commit/?id=80898dea

Use {cli,cgi,fpm}_link variables where appropriate.

These variables were all defined but not used. There were a few places
where they could be profitably inserted.

 src/php.eselect.in | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/php.eselect.in b/src/php.eselect.in
index 4bbc695..ea8676f 100644
--- a/src/php.eselect.in
+++ b/src/php.eselect.in
@@ -139,21 +139,21 @@ find_targets_cgi() {
 
 get_active_cli() {
        # See get_active_apache2() for an explanation of the sed call.
-       local target=$(canonicalise "${EROOT}"/usr/bin/php)
+       local target=$(canonicalise "${cli_link}")
        local ver="s:.*/usr/.*/\(php[0-9]\.[0-9][0-9]*\)/bin/php:\1:p"
        [[ -a "${target}" ]] && echo "${target}" | @SED@ -ne "${ver}"
 }
 
 get_active_cgi() {
        # See get_active_apache2() for an explanation of the sed call.
-       local target=$(canonicalise "${EROOT}"/usr/bin/php-cgi)
+       local target=$(canonicalise "${cgi_link}")
        local ver="s:.*/usr/.*/\(php[0-9]\.[0-9][0-9]*\)/bin/php-cgi:\1:p"
        [[ -a "${target}" ]] && echo "${target}" | @SED@ -ne "${ver}"
 }
 
 get_active_fpm() {
        # See get_active_apache2() for an explanation of the sed call.
-       local target=$(canonicalise "${EROOT}"/usr/bin/php-fpm)
+       local target=$(canonicalise "${fpm_link}")
        local ver="s:.*/usr/.*/\(php[0-9]\.[0-9][0-9]*\)/bin/php-fpm:\1:p"
        [[ -a "${target}" ]] && echo "${target}" | @SED@ -ne "${ver}"
 }
@@ -308,7 +308,7 @@ set_cgi() {
        t=$(resolv_target cgi $1)
        [[ -z $t ]] && die -q "invalid target"
        @LN_S@ --force "../..$(get_active_libdir)/${t}/bin/php-cgi" \
-               "${EROOT}"/usr/bin/php-cgi || \
+               "${cgi_link}" || \
                die -q "failed to create active php-cgi symlink"
 }
 
@@ -316,7 +316,7 @@ set_fpm() {
        local t=$(resolv_target fpm $1)
        [[ -z $t ]] && die -q "invalid target"
        @LN_S@ --force "../..$(get_active_libdir)/${t}/bin/php-fpm" \
-               "${EROOT}"/usr/bin/php-fpm || \
+               "${fpm_link}" || \
                die -q "failed to create symlink for the php-fpm binary"
        echo "Please restart php-fpm for the changes to take effect."
 }

Reply via email to