summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérôme de Bretagne <jerome.debretagne@gmail.com>2020-11-11 17:32:20 +0100
committerJérôme de Bretagne <jerome.debretagne@gmail.com>2020-11-11 17:32:20 +0100
commit28f2cc258cef3cac214e45336a39a9065490d49c (patch)
treec63dc2a2f5d9de5ee7ed6b557769c1ece64fa255
parentf4a89752fcd92697eec00c29e6a1ab87224bfa27 (diff)
downloaderlang-28f2cc258cef3cac214e45336a39a9065490d49c.tar.gz
Support ROOTDIR passed as an environment variable in erl and start scripts
-rw-r--r--erts/etc/unix/erl.src.src13
-rw-r--r--erts/etc/unix/start.src13
2 files changed, 16 insertions, 10 deletions
diff --git a/erts/etc/unix/erl.src.src b/erts/etc/unix/erl.src.src
index 959c099e8f..b7438f615b 100644
--- a/erts/etc/unix/erl.src.src
+++ b/erts/etc/unix/erl.src.src
@@ -1,9 +1,9 @@
#!/bin/sh
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1996-2016. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 1996-2020. All Rights Reserved.
+#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -15,10 +15,13 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-#
+#
# %CopyrightEnd%
#
-ROOTDIR="%FINAL_ROOTDIR%"
+if [ -z "$ROOTDIR" ]
+then
+ ROOTDIR="%FINAL_ROOTDIR%"
+fi
BINDIR=$ROOTDIR/erts-%VSN%/bin
EMU=%EMULATOR%%EMULATOR_NUMBER%
PROGNAME=`echo $0 | sed 's/.*\///'`
diff --git a/erts/etc/unix/start.src b/erts/etc/unix/start.src
index bdd146951f..e3d1b8676a 100644
--- a/erts/etc/unix/start.src
+++ b/erts/etc/unix/start.src
@@ -1,9 +1,9 @@
#!/bin/sh
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1996-2016. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 1996-2020. All Rights Reserved.
+#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -15,7 +15,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-#
+#
# %CopyrightEnd%
#
# This program invokes the erlang emulator by calling run_erl.
@@ -25,7 +25,10 @@
#
# Usage: start [Data]
#
-ROOTDIR=%FINAL_ROOTDIR%
+if [ -z "$ROOTDIR" ]
+then
+ ROOTDIR=%FINAL_ROOTDIR%
+fi
if [ -z "$RELDIR" ]
then