From bfd3035ee9a0603ca202ef1d702c241d00b3adf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 30 Nov 2018 13:49:16 +0100 Subject: Correct expanding of shell variables in autopatch The $(...) form was improperly converted. In addition it must be changed into a $(shell ...) form. --- core/deps.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'core/deps.mk') diff --git a/core/deps.mk b/core/deps.mk index 6b7513e..0efde17 100644 --- a/core/deps.mk +++ b/core/deps.mk @@ -379,9 +379,10 @@ define dep_autopatch_rebar.erl end || H <- Hooks] end end(), - ShellToMk = fun(V) -> - re:replace(re:replace(V, "(\\\\$$)(\\\\w*)", "\\\\1(\\\\2)", [global]), - "-Werror\\\\b", "", [{return, list}, global]) + ShellToMk = fun(V0) -> + V1 = re:replace(V0, "[$$][(]", "$$\(shell ", [global]), + V = re:replace(V1, "(\\\\$$$$)(?![(])(\\\\w*)", "\\\\1(\\\\2)", [global]), + re:replace(V, "-Werror\\\\b", "", [{return, list}, global]) end, PortSpecs = fun() -> case lists:keyfind(port_specs, 1, Conf) of -- cgit v1.2.3