stdenv/setup.sh: make substitute* not drop EOF newline
This should solve #1982.
This commit is contained in:
parent
1ed628acb2
commit
c4371afd06
|
@ -304,9 +304,11 @@ substitute() {
|
|||
|
||||
local -a params=("$@")
|
||||
|
||||
local n p pattern replacement varName
|
||||
local n p pattern replacement varName content
|
||||
|
||||
local content="$(cat $input)"
|
||||
# a slightly hacky way to keep newline at the end
|
||||
content="$(cat $input; echo -n X)"
|
||||
content="${content%X}"
|
||||
|
||||
for ((n = 2; n < ${#params[*]}; n += 1)); do
|
||||
p=${params[$n]}
|
||||
|
|
Loading…
Reference in New Issue