summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2011-08-11 10:40:41 +0000
committerUlrich Müller <ulm@gentoo.org>2011-08-11 10:40:41 +0000
commitd081602c783c0348159bbbb5ebcb20dadca84b96 (patch)
treed7a69272b388e9e121ac8f132ad16fcef4e10a34 /app-misc/editor-wrapper/files
parentAdd missing dependency: dev-perl/Capture-Tiny (#378739) (diff)
downloadhistorical-d081602c783c0348159bbbb5ebcb20dadca84b96.tar.gz
historical-d081602c783c0348159bbbb5ebcb20dadca84b96.tar.bz2
historical-d081602c783c0348159bbbb5ebcb20dadca84b96.zip
Package moved from app-editors/gentoo-editor to app-misc/editor-wrapper.
Package-Manager: portage-2.1.10.10/cvs/Linux x86_64 RepoMan-Options: --force
Diffstat (limited to 'app-misc/editor-wrapper/files')
-rw-r--r--app-misc/editor-wrapper/files/editor-wrapper-2.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/app-misc/editor-wrapper/files/editor-wrapper-2.sh b/app-misc/editor-wrapper/files/editor-wrapper-2.sh
new file mode 100644
index 000000000000..dc8e065e0f29
--- /dev/null
+++ b/app-misc/editor-wrapper/files/editor-wrapper-2.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+# Copyright 2009-2011 Gentoo Foundation
+# Distributed under the terms of the MIT/X11 license
+
+# Editor wrapper script, executes ${EDITOR} with arguments $@
+
+if [ -z "${EDITOR}" ]; then
+ # Try to get EDITOR from system profile
+ EDITOR=$(. /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} "$@"