From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Si7hW-0003Tf-Iw for garchives@archives.gentoo.org; Fri, 22 Jun 2012 17:31:18 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D0172E0912; Fri, 22 Jun 2012 17:29:25 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 91ECCE08BA for ; Fri, 22 Jun 2012 17:29:25 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 102DD1B4028 for ; Fri, 22 Jun 2012 17:29:25 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 6AAB7E5446 for ; Fri, 22 Jun 2012 17:29:22 +0000 (UTC) From: "Ulrich Mueller" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Mueller" Message-ID: <1181069706.68e0de6a0646fd5803f57da93118ab0b4435f2a7.ulm@gentoo> Subject: [gentoo-commits] proj/emacs-tools:eselect-emacs-1.1 commit in: / X-VCS-Repository: proj/emacs-tools X-VCS-Files: emacs.eselect X-VCS-Directories: / X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Mueller X-VCS-Revision: 68e0de6a0646fd5803f57da93118ab0b4435f2a7 X-VCS-Branch: eselect-emacs-1.1 Date: Fri, 22 Jun 2012 17:29:22 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: d79345f7-0ab0-4419-8d7f-e908ad1339f6 X-Archives-Hash: 18f952f2b2ee8700e0cd798e3a80273c commit: 68e0de6a0646fd5803f57da93118ab0b4435f2a7 Author: Ulrich M=C3=BCller gentoo org> AuthorDate: Tue Jun 5 18:55:06 2007 +0000 Commit: Ulrich Mueller gentoo org> CommitDate: Tue Jun 5 18:55:06 2007 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/emacs-tools.g= it;a=3Dcommit;h=3D68e0de6a Some trivial reformatting, mainly break long lines. svn path=3D/emacs-extra/eselect-emacs/; revision=3D369 --- emacs.eselect | 27 +++++++++++++++------------ 1 files changed, 15 insertions(+), 12 deletions(-) diff --git a/emacs.eselect b/emacs.eselect index 4c0ac9d..6443de4 100644 --- a/emacs.eselect +++ b/emacs.eselect @@ -12,13 +12,14 @@ # # Behaviour: # do_show(): -# Checks if /usr/bin/emacs is a link and if the target exists, -# if yes, it outputs the currently linked Emacs version. -# If it is no symlink, the user is told so, the same if there is -# no /usr/bin/emacs or the target does not exist. +# Checks if /usr/bin/emacs is a link and if the target exists, +# if yes, it outputs the currently linked Emacs version. +# If it is no symlink, the user is told so, the same if there is +# no /usr/bin/emacs or the target does not exist. # do_list(): List all available versions of GNU Emacs # do_set(): Set a version to be target of the symlink. -# do_update(): Set the target to the highest version available (optional= ly: only if not set) +# do_update(): Set the target to the highest version available +# (optionally: only if not set) =20 DESCRIPTION=3D"Manage /usr/bin/emacs version" MAINTAINER=3D"emacs@gentoo.org" @@ -48,7 +49,8 @@ set_infopath() { } =20 remove_symlinks() { - # Remove existing symlinks to binaries, man pages, and the env file (ow= n function) + # Remove existing symlinks to binaries, man pages, + # and the env file (own function) local f rm -f "${ROOT}"/usr/bin/emacs for f in ${BINARYLIST}; do @@ -173,10 +175,10 @@ do_list() { =20 if [[ -n ${targets[@]} ]]; then for (( i =3D 0; i < ${#targets[@]}; i =3D i + 1 )); do + # Display a star to indicate the currently chosen version [[ ${targets[${i}]} =3D \ - $(basename $(canonicalise "${ROOT}/usr/bin/emacs") ) ]] && - # Display a star to indicate the currently chosen version - targets[${i}]=3D"${targets[${i}]} $(highlight '*')" + $(basename $(canonicalise "${ROOT}/usr/bin/emacs") ) ]] \ + && targets[${i}]=3D"${targets[${i}]} $(highlight '*')" done write_list_start "Available GNU Emacs symlink targets:" write_numbered_list "${targets[@]}" @@ -205,7 +207,8 @@ do_set() { [[ -n "${2}" ]] && die -q "Too many parameters" test_for_root =20 - if [[ -e "${ROOT}/usr/bin/emacs" ]] && ! [[ -L "${ROOT}/usr/bin/emacs" = ]]; then + if [[ -e "${ROOT}/usr/bin/emacs" ]] \ + && ! [[ -L "${ROOT}/usr/bin/emacs" ]]; then die -q "Sorry, ${ROOT}/usr/bin/emacs exists but is not a symlink" fi =20 @@ -223,8 +226,8 @@ describe_update_options() { } =20 do_update() { - [[ -z "${1}" || ( -z "${2}" && "${1}" =3D=3D "--if-unset" ) ]] || - die -q "Usage error" + [[ -z "${1}" || ( -z "${2}" && "${1}" =3D=3D "--if-unset" ) ]] \ + || die -q "Usage error" test_for_root =20 if [[ -L "${ROOT}/usr/bin/emacs" ]]; then