rel all deps/*

This commit is contained in:
Feng Lee 2015-09-20 21:21:54 +08:00
parent bc88f3f7b5
commit 8900f0561b
1 changed files with 20 additions and 0 deletions

20
rel/reltool.config.script Normal file
View File

@ -0,0 +1,20 @@
%% -*- mode: erlang;erlang-indent-level: 4;indent-tabs-mode: nil -*-
%% ex: ft=erlang ts=4 sw=4 et
Sys = proplists:get_value(sys, CONFIG),
IncludeApps = [App || {app, App, _} <- Sys],
[DepsDir] = proplists:get_value(lib_dirs, Sys),
DepApps = lists:map(fun(AppFile) ->
{ok, [{application, Name, Attrs}]}
= file:consult(filename:join(DepsDir, AppFile)),
Name
end, filelib:wildcard("*/ebin/*.app", DepsDir)),
AppendApps = DepApps -- IncludeApps,
Cond = [{mod_cond, app}, {incl_cond, include}],
NewSys = lists:append(Sys, [{app, App, Cond} || App <- AppendApps]),
io:format("~p~n", [NewSys]),
lists:keyreplace(sys, 1, CONFIG, {sys, NewSys}).