summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2009-05-07 16:47:58 +0000
committerUlrich Müller <ulm@gentoo.org>2009-05-07 16:47:58 +0000
commitf0905413a83fb5ba2e0048983dda05304c79f438 (patch)
tree2d3c5dd8a25a049bb65d7b1ca8985b068e1f981e
parentVersion 1.9 released. (diff)
downloademacs-tools-f0905413a83fb5ba2e0048983dda05304c79f438.tar.gz
emacs-tools-f0905413a83fb5ba2e0048983dda05304c79f438.tar.bz2
emacs-tools-f0905413a83fb5ba2e0048983dda05304c79f438.zip
Remove unnecessary "canonicalise" calls.
svn path=/eselect-emacs/; revision=1270
-rw-r--r--ChangeLog7
-rw-r--r--emacs.eselect8
2 files changed, 9 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index a0a6f5e..1b98136 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-05-07 Ulrich Mueller <ulm@gentoo.org>
+
+ * emacs.eselect (do_show, do_update): "canonicalise" is not
+ necessary since "test -e" resolves symbolic links.
+
2009-05-02 Ulrich Mueller <ulm@gentoo.org>
* Version 1.9 released.
@@ -12,7 +17,7 @@
2009-04-18 Ulrich Mueller <ulm@gentoo.org>
- * ctags.eselect (do_list): Always output a list header, even if
+ * ctags.eselect (do_list): Always output a list header, even if
the list of targets is empty.
(set_symlinks, do_list): Simplify syntax used for array index.
diff --git a/emacs.eselect b/emacs.eselect
index 724be1d..8e7a2ad 100644
--- a/emacs.eselect
+++ b/emacs.eselect
@@ -161,8 +161,7 @@ do_show() {
[[ $# -gt 0 ]] && die -q "Too many parameters"
write_list_start "Current target of Emacs symlink:"
- if [[ -L ${ROOT}${bindir}/emacs && \
- -e $(canonicalise "${ROOT}${bindir}/emacs") ]]; then
+ if [[ -L ${ROOT}${bindir}/emacs && -e ${ROOT}${bindir}/emacs ]]; then
write_kv_list_entry \
"$(basename "$(readlink "${ROOT}${bindir}/emacs")")" ""
elif [[ -e ${ROOT}${bindir}/emacs ]]; then
@@ -248,8 +247,7 @@ do_update() {
test_for_root
if [[ -L ${ROOT}${bindir}/emacs ]]; then
- [[ $1 == *if*unset && -e $(canonicalise "${ROOT}${bindir}/emacs") ]] \
- && return
+ [[ $1 == *if*unset && -e ${ROOT}${bindir}/emacs ]] && return
# this is not redundant: "update" is called in pkg_postrm() of emacs
# and should clean up any dead symlinks if no valid target exists
remove_symlinks || die -q "Couldn't remove existing symlink"
@@ -262,7 +260,7 @@ do_update() {
set_symlinks "${targets[${#targets[@]}-1]}" \
|| die -q "Couldn't set a new symlink"
elif [[ -f ${ROOT}${bindir}/xemacs ]]; then
- # no Emacs target found -- link ctags, etags etc. to XEmacs versions
+ # no Emacs target found - link to XEmacs versions
set_symlinks xemacs nomain
fi