mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-30 16:36:29 +01:00
Let modules_update_specs report failures (#756)
This commit is contained in:
parent
1472bd398a
commit
2a115a83d2
@ -36,6 +36,7 @@
|
|||||||
config_dir/0, opt_type/1]).
|
config_dir/0, opt_type/1]).
|
||||||
|
|
||||||
-include("ejabberd_commands.hrl").
|
-include("ejabberd_commands.hrl").
|
||||||
|
-include("logger.hrl").
|
||||||
|
|
||||||
-define(REPOS, "https://github.com/processone/ejabberd-contrib").
|
-define(REPOS, "https://github.com/processone/ejabberd-contrib").
|
||||||
|
|
||||||
@ -111,10 +112,19 @@ commands() ->
|
|||||||
|
|
||||||
update() ->
|
update() ->
|
||||||
add_sources(?REPOS),
|
add_sources(?REPOS),
|
||||||
lists:foreach(fun({Package, Spec}) ->
|
Res = lists:foldl(fun({Package, Spec}, Acc) ->
|
||||||
Path = proplists:get_value(url, Spec, ""),
|
Path = proplists:get_value(url, Spec, ""),
|
||||||
add_sources(Package, Path)
|
Update = add_sources(Package, Path),
|
||||||
end, modules_spec(sources_dir(), "*")).
|
?INFO_MSG("Update package ~s: ~p", [Package, Update]),
|
||||||
|
case Update of
|
||||||
|
ok -> Acc;
|
||||||
|
Error -> [Error|Acc]
|
||||||
|
end
|
||||||
|
end, [], modules_spec(sources_dir(), "*")),
|
||||||
|
case Res of
|
||||||
|
[] -> ok;
|
||||||
|
[Error|_] -> Error
|
||||||
|
end.
|
||||||
|
|
||||||
available() ->
|
available() ->
|
||||||
Jungle = modules_spec(sources_dir(), "*/*"),
|
Jungle = modules_spec(sources_dir(), "*/*"),
|
||||||
|
Loading…
Reference in New Issue
Block a user