diff options
author | Luis Rascão <[email protected]> | 2017-10-19 17:54:22 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2017-10-19 17:54:22 +0100 |
commit | c903d54f057bca328f231c5c10f13ba42956eee2 (patch) | |
tree | 4eaae1ad2322215c6bf9ae7493e5366c0f42252d /priv/templates/extended_bin | |
parent | b02e2a90fa89df222472cefcab070bdefa0c2a55 (diff) | |
parent | 57cce73c3d3439b4b6a73ed6963502daef408b7e (diff) | |
download | relx-c903d54f057bca328f231c5c10f13ba42956eee2.tar.gz relx-c903d54f057bca328f231c5c10f13ba42956eee2.tar.bz2 relx-c903d54f057bca328f231c5c10f13ba42956eee2.zip |
Merge pull request #586 from expelledboy/feature/replace-defined-os-vars
Only print lines for os var that are set
Diffstat (limited to 'priv/templates/extended_bin')
-rwxr-xr-x | priv/templates/extended_bin | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/priv/templates/extended_bin b/priv/templates/extended_bin index 1b619d4..87128b7 100755 --- a/priv/templates/extended_bin +++ b/priv/templates/extended_bin @@ -229,7 +229,8 @@ replace_os_vars() { awk '{ while(match($0,"[$]{[^}]*}")) { var=substr($0,RSTART+2,RLENGTH -3) - gsub("[$]{"var"}",ENVIRON[var]) + if (ENVIRON[var]) gsub("[$]{"var"}",ENVIRON[var]); + else next } }1' < "$1" > "$2" } |