Make rebar understand wildcard in subdir

If you have dir with many erlang app, then you can simple write
{sub_dirs, ["some_dir/*"]}. Rebar will make operation on subdirs of
dir "some_dir".
This commit is contained in:
Юрин Вячеслав 2012-02-03 21:06:18 +07:00 committed by Tuncer Ayaz
parent 4e0c9506f5
commit 0424d75d78

View file

@ -38,7 +38,8 @@
preprocess(Config, _) -> preprocess(Config, _) ->
%% Get the list of subdirs specified in the config (if any). %% Get the list of subdirs specified in the config (if any).
Cwd = rebar_utils:get_cwd(), Cwd = rebar_utils:get_cwd(),
Subdirs0 = rebar_config:get_local(Config, sub_dirs, []), ListSubdirs = rebar_config:get_local(Config, sub_dirs, []),
Subdirs0 = lists:flatmap(fun filelib:wildcard/1, ListSubdirs),
case {rebar_core:is_skip_dir(Cwd), Subdirs0} of case {rebar_core:is_skip_dir(Cwd), Subdirs0} of
{true, []} -> {true, []} ->
{ok, []}; {ok, []};