aboutsummaryrefslogtreecommitdiffstats
path: root/priv
diff options
context:
space:
mode:
authorAnthony Jackson <[email protected]>2017-04-10 22:18:29 +0200
committerAnthony Jackson <[email protected]>2017-10-19 15:17:48 +0200
commit57cce73c3d3439b4b6a73ed6963502daef408b7e (patch)
tree4eaae1ad2322215c6bf9ae7493e5366c0f42252d /priv
parentb02e2a90fa89df222472cefcab070bdefa0c2a55 (diff)
downloadrelx-57cce73c3d3439b4b6a73ed6963502daef408b7e.tar.gz
relx-57cce73c3d3439b4b6a73ed6963502daef408b7e.tar.bz2
relx-57cce73c3d3439b4b6a73ed6963502daef408b7e.zip
Only print lines for os var that are set
Diffstat (limited to 'priv')
-rwxr-xr-xpriv/templates/extended_bin3
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"
}