Commit ebeec218 authored by Mihai Moldovan's avatar Mihai Moldovan
Browse files

x2goserver/Makefile: build up sed argument line as an array and use one substitution run.

Multiple runs with the template file as input will lead to only the last
replacement to stick in the resulting generated script, which is not
what we want to have.

Correctly doing that with multiple runs would require the usage of
temporary files, which is needlessly complicated in this context.
parent 1bb091ca
......@@ -124,6 +124,12 @@ x2goserver (4.1.0.4-0x2go1.1) UNRELEASED; urgency=medium
in comment lines.
- x2goserver/Makefile: export common variables for direct use in shell
script sections.
- x2goserver/Makefile: build up sed argument line as an array and use one
substitution run. Multiple runs with the template file as input will
lead to only the last replacement to stick in the resulting generated
script, which is not what we want to have. Correctly doing that with
multiple runs would require the usage of temporary files, which is
needlessly complicated in this context.
* debian/control:
+ Build-depend upon lsb-release for distro version detection.
* debian/x2goserver.manpages:
......
......@@ -49,9 +49,12 @@ build-indep: build_pod2man build_man2html
cp -a "$${gen_file}" "$${file}"; \
\
$$(: "Run actual substitutions."); \
typeset -a sed_args; \
sed_args=(); \
for subst in 'PREFIX' 'ETCDIR' 'BINDIR' 'SBINDIR' 'LIBDIR' 'NXLIBDIR' 'MANDIR' 'SHAREDIR'; do \
sed -e "s#@@$${subst}@@#$${!subst}#g" "$${gen_file}" > "$${file}"; \
sed_args+=( '-e' "s#@@$${subst}@@#$${!subst}#g" ); \
done; \
sed "$${sed_args[@]}" "$${gen_file}" > "$${file}"; \
fi; \
done; \
done
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment