From: "James Le Cuirot" <chewi@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/eselect-java:master commit in: src/modules/, /
Date: Wed, 3 Jan 2018 22:51:09 +0000 (UTC) [thread overview]
Message-ID: <1514933695.27140082a5c7f0ce57adcddf52681f556ca1fb36.chewi@gentoo> (raw)
commit: 27140082a5c7f0ce57adcddf52681f556ca1fb36
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 29 22:50:36 2017 +0000
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
CommitDate: Tue Jan 2 22:54:55 2018 +0000
URL: https://gitweb.gentoo.org/proj/eselect-java.git/commit/?id=27140082
Fix showing and highlighting current ecj and mvn targets (#585224)
NEWS | 1 +
src/modules/ecj.eselect.in | 9 +++++----
src/modules/maven.eselect.in | 9 +++++----
3 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/NEWS b/NEWS
index a0102aa..c85ba17 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@
* Don't emit (unset) or (not a symlink) on stderr (#549498)
* Fix mkdir die message in java-vm module
* Sort java-vm targets in version order rather than alphanumeric
+ * Fix showing and highlighting current ecj + mvn targets (#585224)
0.3.0:
diff --git a/src/modules/ecj.eselect.in b/src/modules/ecj.eselect.in
index 7b6d784..353bcc5 100644
--- a/src/modules/ecj.eselect.in
+++ b/src/modules/ecj.eselect.in
@@ -38,8 +38,8 @@ find_target() {
# determine the current target.
get_target() {
- local canonicalised=$(canonicalise "${ECJ}")
- echo $(basename "${canonicalised}")
+ local target=$(readlink "${ECJ}")
+ echo ${target##*/}
}
### show action ###
@@ -76,11 +76,12 @@ do_list() {
die -q "Usage error: no parameters allowed."
fi
- local i targets
+ local i targets target
targets=( $(find_targets) )
+ target=$(get_target)
for (( i = 0; i < ${#targets[@]}; i++ )); do
- [[ ${targets[i]} = $(basename "$(canonicalise "${ECJ}")") ]] \
+ [[ ${targets[i]} = ${target} ]] \
&& targets[i]=$(highlight_marker "${targets[i]}")
done
diff --git a/src/modules/maven.eselect.in b/src/modules/maven.eselect.in
index f0cf2e4..247fee7 100644
--- a/src/modules/maven.eselect.in
+++ b/src/modules/maven.eselect.in
@@ -41,8 +41,8 @@ remove_symlink() {
# determine the current target.
get_target() {
- local canonicalised=$(canonicalise "${MVN}")
- echo $(basename "${canonicalised}")
+ local target=$(readlink "${MVN}")
+ echo ${target##*/}
}
# set the Maven symlink.
@@ -86,11 +86,12 @@ do_list() {
die -q "Usage error: no parameters allowed."
fi
- local i targets
+ local i targets target
targets=( $(find_targets) )
+ target=$(get_target)
for (( i = 0; i < ${#targets[@]}; i++ )); do
- [[ ${targets[i]} = $(basename "$(canonicalise "${MVN}")") ]] \
+ [[ ${targets[i]} = ${target} ]] \
&& targets[i]=$(highlight_marker "${targets[i]}")
done
next reply other threads:[~2018-01-03 22:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-03 22:51 James Le Cuirot [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-06-24 10:33 [gentoo-commits] proj/eselect-java:master commit in: src/modules/, / Florian Schmaus
2022-06-24 9:21 [gentoo-commits] proj/eselect-java:java-vm-update commit in: /, src/modules/ Florian Schmaus
2022-06-24 10:33 ` [gentoo-commits] proj/eselect-java:master commit in: src/modules/, / Florian Schmaus
2018-01-03 22:51 James Le Cuirot
2018-01-03 22:51 James Le Cuirot
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=1514933695.27140082a5c7f0ce57adcddf52681f556ca1fb36.chewi@gentoo \
--to=chewi@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