diff options
-rw-r--r-- | app-misc/editor-wrapper/ChangeLog | 8 | ||||
-rw-r--r-- | app-misc/editor-wrapper/editor-wrapper-4.ebuild | 28 | ||||
-rw-r--r-- | app-misc/editor-wrapper/files/editor-wrapper-4.sh | 17 |
3 files changed, 52 insertions, 1 deletions
diff --git a/app-misc/editor-wrapper/ChangeLog b/app-misc/editor-wrapper/ChangeLog index ce179c6f8461..0b9104e24d42 100644 --- a/app-misc/editor-wrapper/ChangeLog +++ b/app-misc/editor-wrapper/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-misc/editor-wrapper # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-misc/editor-wrapper/ChangeLog,v 1.5 2011/08/21 13:19:41 nixnut Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-misc/editor-wrapper/ChangeLog,v 1.6 2011/08/22 22:33:54 ulm Exp $ + +*editor-wrapper-4 (22 Aug 2011) + + 22 Aug 2011; Ulrich Mueller <ulm@gentoo.org> +editor-wrapper-4.ebuild, + +files/editor-wrapper-4.sh: + Version bump, fixes bug 380285. 21 Aug 2011; nixnut <nixnut@gentoo.org> editor-wrapper-3.ebuild: ppc stable 379743 diff --git a/app-misc/editor-wrapper/editor-wrapper-4.ebuild b/app-misc/editor-wrapper/editor-wrapper-4.ebuild new file mode 100644 index 000000000000..10f6689a64b8 --- /dev/null +++ b/app-misc/editor-wrapper/editor-wrapper-4.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-misc/editor-wrapper/editor-wrapper-4.ebuild,v 1.1 2011/08/22 22:33:54 ulm Exp $ + +EAPI=4 + +DESCRIPTION="Wrapper scripts that will execute EDITOR or PAGER" +HOMEPAGE="http://www.gentoo.org/" +SRC_URI="" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" +IUSE="" + +S="${WORKDIR}" + +src_prepare() { + sed -e 's/@VAR@/EDITOR/g' "${FILESDIR}/${P}.sh" >editor || die + sed -e 's/@VAR@/PAGER/g' "${FILESDIR}/${P}.sh" >pager || die +} + +src_install() { + exeinto /usr/libexec + doexe editor pager + # backwards compatibility + dosym editor /usr/libexec/gentoo-editor +} diff --git a/app-misc/editor-wrapper/files/editor-wrapper-4.sh b/app-misc/editor-wrapper/files/editor-wrapper-4.sh new file mode 100644 index 000000000000..b58f1a8b9eeb --- /dev/null +++ b/app-misc/editor-wrapper/files/editor-wrapper-4.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# Copyright 2009-2011 Gentoo Foundation +# Distributed under the terms of the MIT/X11 license + +# Wrapper script, executes ${@VAR@} with arguments $@ + +if [ -z "${@VAR@}" ]; then + # Try to get @VAR@ from system profile + @VAR@=$(. /etc/profile >/dev/null 2>&1; echo "${@VAR@}") +fi + +if [ -z "${@VAR@}" ]; then + echo "$0: The @VAR@ variable must be set" >&2 + exit 1 +fi + +exec ${@VAR@} "$@" |