summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2009-11-21 21:56:07 +0000
committerUlrich Müller <ulm@gentoo.org>2009-11-21 21:56:07 +0000
commitcf3e6da773b569338192e40b15d03bde09d82318 (patch)
treef1b9aef2822369d1d140d345c1fdf224032785ad /app-editors
parentVersion bump (diff)
downloadgentoo-2-cf3e6da773b569338192e40b15d03bde09d82318.tar.gz
gentoo-2-cf3e6da773b569338192e40b15d03bde09d82318.tar.bz2
gentoo-2-cf3e6da773b569338192e40b15d03bde09d82318.zip
Initial import, bug 286017.
(Portage version: 2.2_rc50/cvs/Linux i686)
Diffstat (limited to 'app-editors')
-rw-r--r--app-editors/gentoo-editor/ChangeLog11
-rw-r--r--app-editors/gentoo-editor/files/gentoo-editor-1.sh30
-rw-r--r--app-editors/gentoo-editor/gentoo-editor-1.ebuild17
-rw-r--r--app-editors/gentoo-editor/metadata.xml6
4 files changed, 64 insertions, 0 deletions
diff --git a/app-editors/gentoo-editor/ChangeLog b/app-editors/gentoo-editor/ChangeLog
new file mode 100644
index 000000000000..ed74252143c5
--- /dev/null
+++ b/app-editors/gentoo-editor/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for app-editors/gentoo-editor
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-editors/gentoo-editor/ChangeLog,v 1.1 2009/11/21 21:56:06 ulm Exp $
+
+*gentoo-editor-1 (21 Nov 2009)
+
+ 21 Nov 2009; Ulrich Mueller <ulm@gentoo.org> +gentoo-editor-1.ebuild,
+ +files/gentoo-editor-1.sh, +metadata.xml:
+ Initial import, bug 286017. gentoo-editor script by Diego Pettenò, with
+ modifications by me.
+
diff --git a/app-editors/gentoo-editor/files/gentoo-editor-1.sh b/app-editors/gentoo-editor/files/gentoo-editor-1.sh
new file mode 100644
index 000000000000..0a89f483eb58
--- /dev/null
+++ b/app-editors/gentoo-editor/files/gentoo-editor-1.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+# Copyright 2009 Gentoo Foundation
+# Distributed under the terms of the MIT license
+
+# Editor wrapper script, executes ${EDITOR} on file $1.
+# We disallow options and multiple file name arguments on purpose, so
+# that packages' configure scripts cannot sniff out the type of editor.
+
+if [ $# -ne 1 ]; then
+ echo "$0: Exactly one argument required" >&2
+ exit 1
+fi
+
+file=$1
+if [ "${file#-}" != "${file}" ]; then
+ # Argument is supposed to be a file name, not an option
+ file=./${file}
+fi
+
+if [ -z "${EDITOR}" ]; then
+ # Try to get EDITOR from system profile
+ EDITOR=$(source /etc/profile &>/dev/null; echo "${EDITOR}")
+fi
+
+if [ -z "${EDITOR}" ]; then
+ echo "$0: The EDITOR variable must be set" >&2
+ exit 1
+fi
+
+exec ${EDITOR} "${file}"
diff --git a/app-editors/gentoo-editor/gentoo-editor-1.ebuild b/app-editors/gentoo-editor/gentoo-editor-1.ebuild
new file mode 100644
index 000000000000..5f731113ccfc
--- /dev/null
+++ b/app-editors/gentoo-editor/gentoo-editor-1.ebuild
@@ -0,0 +1,17 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-editors/gentoo-editor/gentoo-editor-1.ebuild,v 1.1 2009/11/21 21:56:06 ulm Exp $
+
+DESCRIPTION="Auxiliary editor script"
+HOMEPAGE="http://www.gentoo.org/"
+SRC_URI=""
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+src_install() {
+ exeinto /usr/libexec
+ newexe "${FILESDIR}/${P}.sh" gentoo-editor || die
+}
diff --git a/app-editors/gentoo-editor/metadata.xml b/app-editors/gentoo-editor/metadata.xml
new file mode 100644
index 000000000000..83d335031da4
--- /dev/null
+++ b/app-editors/gentoo-editor/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+<herd>emacs</herd>
+</pkgmetadata>