summaryrefslogtreecommitdiff
path: root/app-misc/editor-wrapper/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-misc/editor-wrapper/files
reinit the tree, so we can have metadata
Diffstat (limited to 'app-misc/editor-wrapper/files')
-rw-r--r--app-misc/editor-wrapper/files/editor-wrapper-4.sh17
1 files changed, 17 insertions, 0 deletions
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@} "$@"