mirror of
https://github.com/processone/ejabberd.git
synced 2024-09-25 14:24:55 +02:00
In module_install copy also deps/ebin and priv files (ejabberd-contrib#200)
This commit is contained in:
parent
a90c337297
commit
113ed66f49
@ -570,10 +570,13 @@ compile_elixir_file(Dest, File) ->
|
||||
install(Module, Spec, SrcDir, LibDir) ->
|
||||
{ok, CurDir} = file:get_cwd(),
|
||||
file:set_cwd(SrcDir),
|
||||
Files1 = [{File, copy(File, filename:join(LibDir, File))}
|
||||
|| File <- filelib:wildcard("{ebin,priv,conf,include}/**")],
|
||||
Files2 = [{File, copy(File, filename:join(LibDir, filename:join(lists:nthtail(2,filename:split(File)))))}
|
||||
|| File <- filelib:wildcard("deps/*/{ebin,priv}/**")],
|
||||
Errors = lists:dropwhile(fun({_, ok}) -> true;
|
||||
(_) -> false
|
||||
end, [{File, copy(File, filename:join(LibDir, File))}
|
||||
|| File <- filelib:wildcard("{ebin,priv,conf,include}/**")]),
|
||||
end, Files1++Files2),
|
||||
Result = case Errors of
|
||||
[{F, {error, E}}|_] ->
|
||||
{error, {F, E}};
|
||||
|
Loading…
Reference in New Issue
Block a user