Created
March 21, 2019 20:58
-
-
Save joaohf/03596d956ed549304936d19aa711312c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ReplaceIncludeErts = | |
fun(Path, Config) -> | |
ReplaceRelx(include_erts, Path, Config) | |
end, | |
ReplaceSystemLibs = | |
fun(Path, Config) -> | |
ReplaceRelx(system_libs, Path, Config) | |
end, | |
EnvTargetIncludeErts = os:getenv("REBAR3_TARGET_INCLUDE_ERTS"), | |
EnvTargetSystemLibs = os:getenv("REBAR3_TARGET_SYSTEM_LIBS"), | |
Check = {EnvTargetIncludeErts, EnvTargetSystemLibs}, | |
case Check of | |
{false, false} -> | |
CONFIG; | |
{IncludeErts, false} -> | |
ReplaceIncludeErts(IncludeErts, CONFIG); | |
{false, SystemLibs} -> | |
ReplaceSystemLibs(SystemLibs, CONFIG); | |
{IncludeErts, SystemLibs} -> | |
CONFIG1 = ReplaceIncludeErts(IncludeErts, CONFIG), | |
ReplaceSystemLibs(SystemLibs, CONFIG1) | |
end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment