aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--priv/templates/extended_bin.dtl10
2 files changed, 13 insertions, 1 deletions
diff --git a/README.md b/README.md
index 47fe83f..a821622 100644
--- a/README.md
+++ b/README.md
@@ -31,7 +31,9 @@ To build relx and generate a standalone escript executable:
This creates the executable `relx`.
-Note, if using your own `rebar`, it must at least be > version [2.2.0](https://github.com/rebar/rebar/releases)
+Note, if using your own `rebar`, it must at least be > version
+2.2.0-20-g6e24cd6. Unfortunately, the 2.2.0 release of rebar is not
+sufficient.
Building on Windows
-------------------
diff --git a/priv/templates/extended_bin.dtl b/priv/templates/extended_bin.dtl
index 807116b..0dcdd18 100644
--- a/priv/templates/extended_bin.dtl
+++ b/priv/templates/extended_bin.dtl
@@ -65,6 +65,11 @@ if [ -z "$VMARGS_PATH" ]; then
fi
fi
+if [ $RELX_REPLACE_OS_VARS ]; then
+ awk '{while(match($0,"[$]{[^}]*}")) {var=substr($0,RSTART+2,RLENGTH -3);gsub("[$]{"var"}",ENVIRON[var])}}1' < $VMARGS_PATH > $VMARGS_PATH.2.config
+ VMARGS_PATH=$VMARGS_PATH.2.config
+fi
+
# Make sure log directory exists
mkdir -p "$RUNNER_LOG_DIR"
@@ -76,6 +81,11 @@ if [ -z "$CONFIG_PATH" ]; then
fi
fi
+if [ $RELX_REPLACE_OS_VARS ]; then
+ awk '{while(match($0,"[$]{[^}]*}")) {var=substr($0,RSTART+2,RLENGTH -3);gsub("[$]{"var"}",ENVIRON[var])}}1' < $CONFIG_PATH > $CONFIG_PATH.2.config
+ CONFIG_PATH=$CONFIG_PATH.2.config
+fi
+
# Extract the target node name from node.args
NAME_ARG=$(egrep '^-s?name' "$VMARGS_PATH")
if [ -z "$NAME_ARG" ]; then