aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Uhlig <[email protected]>2017-10-06 12:03:11 +0200
committerGitHub <[email protected]>2017-10-06 12:03:11 +0200
commitdfa6c7ab45304080038145433a42a69233ac1dcb (patch)
treeb91677c37d2efd178314ad016c24cf9adeec2718
parent56b366441d2e5f8046e2fe967987fe03958542f6 (diff)
downloadrelx-dfa6c7ab45304080038145433a42a69233ac1dcb.tar.gz
relx-dfa6c7ab45304080038145433a42a69233ac1dcb.tar.bz2
relx-dfa6c7ab45304080038145433a42a69233ac1dcb.zip
fix for OSX awk
usage of \s in awk regexp is a gawk extension. OSX comes with a different variant of awk. This fix should make the awk code POSIX-compliant and should work in all variants of awk (tested with gawk --traditional)
-rwxr-xr-xpriv/templates/extended_bin6
1 files changed, 3 insertions, 3 deletions
diff --git a/priv/templates/extended_bin b/priv/templates/extended_bin
index e3b8f1a..3d876f0 100755
--- a/priv/templates/extended_bin
+++ b/priv/templates/extended_bin
@@ -297,11 +297,11 @@ VMARGS_PATH=$(add_path vm.args $VMARGS_PATH)
# Extract the target node name from vm.args or referenced args_files
NAME_ARG=$(awk 'function find_name(file) {
while ((getline line<file)>0) {
- if (line~/^-args_file\s+/) {
- gsub(/^-args_file\s+/, "", line)
+ if (line~/^-args_file +/) {
+ gsub(/^-args_file +/, "", line)
find_name(line)
}
- else if (line~/^-s?name\s+/) {
+ else if (line~/^-s?name +/) {
print line
exit
}