From: "Michael Orlitzky" <mjo@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/eselect-php:master commit in: src/
Date: Sat, 9 Jan 2016 02:24:05 +0000 (UTC) [thread overview]
Message-ID: <1452306068.98bd99ab0dfb91297091b52fad8622b1b689b096.mjo@gentoo> (raw)
commit: 98bd99ab0dfb91297091b52fad8622b1b689b096
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 9 02:21:08 2016 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sat Jan 9 02:21:08 2016 +0000
URL: https://gitweb.gentoo.org/proj/eselect-php.git/commit/?id=98bd99ab
Fix cleanup and update actions.
src/php.eselect.in | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/src/php.eselect.in b/src/php.eselect.in
index d19b93a..e0c208a 100644
--- a/src/php.eselect.in
+++ b/src/php.eselect.in
@@ -183,12 +183,13 @@ cleanup_sapis() {
}
cleanup_sapi() {
- local l=${1}_link
+ local sapi="${1}"
+ local l="${sapi}_link"
local link=${!l}
if [[ -L $link && ! -e $link ]] ; then
- echo -n "Broken link for $1"
+ echo -n "Broken link for ${sapi}"
if update_sapi $1 ; then
- echo ", updated version to $(get_active_$1)"
+ echo ", updated version to $(get_sapi_active_target "${sapi}")"
return
else
rm $link || die "failed to remove ${link}"
@@ -197,7 +198,7 @@ cleanup_sapi() {
fi
fi
- if [[ "${1}" == "apache2" ]]; then
+ if [[ "${sapi}" == "apache2" ]] ; then
rm -f "${EROOT}$(get_active_libdir)/apache2/modules/libphp[57].so" \
|| die "failed to remove old libphp.so symlink"
fi
@@ -206,11 +207,12 @@ cleanup_sapi() {
}
update_sapi() {
- local target=$(find_sapi_targets $1 | tail -n 1)
- local current=$(get_active_$1)
+ local sapi="${1}"
+ local target=$(find_sapi_targets "${sapi}" | tail -n 1)
+ local current=$(get_sapi_active_target "${sapi}")
[[ -z $target ]] && return 1
[[ $current = $target ]] && return 1
- set_$1 $target
+ set_$sapi $target
}
get_libdirs() {
@@ -580,16 +582,17 @@ describe_update_options() {
}
do_update() {
- check_module $1
+ local sapi="${1}"
+ check_module "${sapi}"
[[ -z ${2} || ( -z ${3} && ( ${2} == ifunset || ${2} == '--if-unset' ) ) ]] || \
die -q "Usage error"
- if [[ (${2} == ifunset || ${2} == '--if-unset') && -n $(get_active_$1) ]];
+ if [[ (${2} == ifunset || ${2} == '--if-unset') && -n $(get_sapi_active_target "${sapi}") ]];
then
return
fi
- update_sapi $1 || echo "Nothing to update"
+ update_sapi "${sapi}" || echo "Nothing to update"
}
## cleanup action
next reply other threads:[~2016-01-09 2:24 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-09 2:24 Michael Orlitzky [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-12-08 2:24 [gentoo-commits] proj/eselect-php:master commit in: src/ Brian Evans
2020-03-01 12:59 Michael Orlitzky
2020-02-29 22:16 Michael Orlitzky
2020-02-29 22:16 Michael Orlitzky
2020-02-29 22:16 Michael Orlitzky
2020-02-29 22:16 Michael Orlitzky
2020-02-12 22:30 Michael Orlitzky
2018-04-12 2:24 Michael Orlitzky
2016-01-22 20:53 Michael Orlitzky
2016-01-22 19:42 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22 19:14 Michael Orlitzky
2016-01-22 3:15 Michael Orlitzky
2016-01-22 3:15 Michael Orlitzky
2016-01-22 3:15 Michael Orlitzky
2016-01-22 3:15 Michael Orlitzky
2016-01-20 14:42 Michael Orlitzky
2016-01-09 17:20 Michael Orlitzky
2016-01-09 17:20 Michael Orlitzky
2016-01-09 2:24 Michael Orlitzky
2016-01-09 2:24 Michael Orlitzky
2016-01-09 2:24 Michael Orlitzky
2016-01-09 2:24 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2016-01-08 21:50 Michael Orlitzky
2015-12-20 0:17 Michael Orlitzky
2015-12-20 0:17 Michael Orlitzky
2015-12-20 0:17 Michael Orlitzky
2015-12-20 0:17 Michael Orlitzky
2015-12-20 0:17 Michael Orlitzky
2015-12-20 0:17 Michael Orlitzky
2015-12-20 0:17 Michael Orlitzky
2015-12-20 0:17 Michael Orlitzky
2015-12-20 0:17 Michael Orlitzky
2015-12-18 2:27 Brian Evans
2015-12-11 0:40 Michael Orlitzky
2015-12-11 0:40 Michael Orlitzky
2015-12-11 0:40 Michael Orlitzky
2015-12-11 0:40 Michael Orlitzky
2015-12-11 0:40 Michael Orlitzky
2015-12-11 0:40 Michael Orlitzky
2015-12-11 0:40 Michael Orlitzky
2015-12-11 0:40 Michael Orlitzky
2015-12-11 0:40 Michael Orlitzky
2015-12-11 0:40 Michael Orlitzky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1452306068.98bd99ab0dfb91297091b52fad8622b1b689b096.mjo@gentoo \
--to=mjo@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox