aboutsummaryrefslogtreecommitdiffstats
path: root/priv/templates
diff options
context:
space:
mode:
authorLuis Rascão <[email protected]>2017-10-19 17:54:22 +0100
committerGitHub <[email protected]>2017-10-19 17:54:22 +0100
commitc903d54f057bca328f231c5c10f13ba42956eee2 (patch)
tree4eaae1ad2322215c6bf9ae7493e5366c0f42252d /priv/templates
parentb02e2a90fa89df222472cefcab070bdefa0c2a55 (diff)
parent57cce73c3d3439b4b6a73ed6963502daef408b7e (diff)
downloadrelx-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')
-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"
}