aboutsummaryrefslogtreecommitdiffstats
path: root/src/rlx_prv_discover.erl
diff options
context:
space:
mode:
authorJordan Wilberding <[email protected]>2013-10-15 09:49:36 -0700
committerJordan Wilberding <[email protected]>2013-10-15 09:49:36 -0700
commit73502b0c33811455e0bbabc2692de191ddc5fc65 (patch)
tree62ef34c600455bde3d02f51c81fe962fb71171dd /src/rlx_prv_discover.erl
parent9e390a7022b1f5296d4fdb7618d13d843ed26bde (diff)
parent750c3df605de8e7dc0f4d809e2fe7aa09827eee1 (diff)
downloadrelx-73502b0c33811455e0bbabc2692de191ddc5fc65.tar.gz
relx-73502b0c33811455e0bbabc2692de191ddc5fc65.tar.bz2
relx-73502b0c33811455e0bbabc2692de191ddc5fc65.zip
Merge pull request #68 from tsloughter/master
add optoin to use custom system_libs dir. This closes #64
Diffstat (limited to 'src/rlx_prv_discover.erl')
-rw-r--r--src/rlx_prv_discover.erl27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/rlx_prv_discover.erl b/src/rlx_prv_discover.erl
index 0ac4aac..5d09619 100644
--- a/src/rlx_prv_discover.erl
+++ b/src/rlx_prv_discover.erl
@@ -100,22 +100,27 @@ add_common_project_dirs(State) ->
Ebin = filename:join(Root, "ebin"),
lists:foldl(fun(Dir, LibDirs) ->
case ec_file:exists(Dir) of
- true ->
- [erlang:iolist_to_binary(Dir) | LibDirs];
- false ->
- LibDirs
- end
- end, [], [Deps, Lib, Apps, Ebin])
+ true ->
+ [erlang:iolist_to_binary(Dir) | LibDirs];
+ false ->
+ LibDirs
+ end
+ end, [], [Deps, Lib, Apps, Ebin])
end.
-spec add_system_lib_dir(rlx_state:t()) -> [file:name()].
add_system_lib_dir(State) ->
ExcludeSystem = rlx_state:get(State, discover_exclude_system, false),
- case ExcludeSystem of
- true ->
- [];
- false ->
- erlang:iolist_to_binary(code:lib_dir())
+ case rlx_state:get(State, system_libs, undefined) of
+ undefined ->
+ case ExcludeSystem of
+ true ->
+ [];
+ false ->
+ erlang:iolist_to_binary(code:lib_dir())
+ end;
+ SystemLibs ->
+ erlang:iolist_to_binary(SystemLibs)
end.
add_release_output_dir(State) ->