1 |
commit: 80898dea109417f9b8990837a4292ed90018f8d9 |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Dec 10 22:35:55 2015 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Dec 10 22:35:55 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/eselect-php.git/commit/?id=80898dea |
7 |
|
8 |
Use {cli,cgi,fpm}_link variables where appropriate. |
9 |
|
10 |
These variables were all defined but not used. There were a few places |
11 |
where they could be profitably inserted. |
12 |
|
13 |
src/php.eselect.in | 10 +++++----- |
14 |
1 file changed, 5 insertions(+), 5 deletions(-) |
15 |
|
16 |
diff --git a/src/php.eselect.in b/src/php.eselect.in |
17 |
index 4bbc695..ea8676f 100644 |
18 |
--- a/src/php.eselect.in |
19 |
+++ b/src/php.eselect.in |
20 |
@@ -139,21 +139,21 @@ find_targets_cgi() { |
21 |
|
22 |
get_active_cli() { |
23 |
# See get_active_apache2() for an explanation of the sed call. |
24 |
- local target=$(canonicalise "${EROOT}"/usr/bin/php) |
25 |
+ local target=$(canonicalise "${cli_link}") |
26 |
local ver="s:.*/usr/.*/\(php[0-9]\.[0-9][0-9]*\)/bin/php:\1:p" |
27 |
[[ -a "${target}" ]] && echo "${target}" | @SED@ -ne "${ver}" |
28 |
} |
29 |
|
30 |
get_active_cgi() { |
31 |
# See get_active_apache2() for an explanation of the sed call. |
32 |
- local target=$(canonicalise "${EROOT}"/usr/bin/php-cgi) |
33 |
+ local target=$(canonicalise "${cgi_link}") |
34 |
local ver="s:.*/usr/.*/\(php[0-9]\.[0-9][0-9]*\)/bin/php-cgi:\1:p" |
35 |
[[ -a "${target}" ]] && echo "${target}" | @SED@ -ne "${ver}" |
36 |
} |
37 |
|
38 |
get_active_fpm() { |
39 |
# See get_active_apache2() for an explanation of the sed call. |
40 |
- local target=$(canonicalise "${EROOT}"/usr/bin/php-fpm) |
41 |
+ local target=$(canonicalise "${fpm_link}") |
42 |
local ver="s:.*/usr/.*/\(php[0-9]\.[0-9][0-9]*\)/bin/php-fpm:\1:p" |
43 |
[[ -a "${target}" ]] && echo "${target}" | @SED@ -ne "${ver}" |
44 |
} |
45 |
@@ -308,7 +308,7 @@ set_cgi() { |
46 |
t=$(resolv_target cgi $1) |
47 |
[[ -z $t ]] && die -q "invalid target" |
48 |
@LN_S@ --force "../..$(get_active_libdir)/${t}/bin/php-cgi" \ |
49 |
- "${EROOT}"/usr/bin/php-cgi || \ |
50 |
+ "${cgi_link}" || \ |
51 |
die -q "failed to create active php-cgi symlink" |
52 |
} |
53 |
|
54 |
@@ -316,7 +316,7 @@ set_fpm() { |
55 |
local t=$(resolv_target fpm $1) |
56 |
[[ -z $t ]] && die -q "invalid target" |
57 |
@LN_S@ --force "../..$(get_active_libdir)/${t}/bin/php-fpm" \ |
58 |
- "${EROOT}"/usr/bin/php-fpm || \ |
59 |
+ "${fpm_link}" || \ |
60 |
die -q "failed to create symlink for the php-fpm binary" |
61 |
echo "Please restart php-fpm for the changes to take effect." |
62 |
} |