diff options
author | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2011-12-12 17:16:29 +0100 |
---|---|---|
committer | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2011-12-12 17:53:56 +0100 |
commit | a5e39c2c545e2a9dd33dc08d5161234a681d7aa6 (patch) | |
tree | 46134d0c6b33ca5d48f03b33b9e4acefd139596a /src/rebar_utils.erl | |
parent | b1d84514f010aa3de32fda204207dec33c6f7a8c (diff) |
Move is_skipped_app/0 to rebar_app_utils
Diffstat (limited to 'src/rebar_utils.erl')
-rw-r--r-- | src/rebar_utils.erl | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl index 0265f45..838b71a 100644 --- a/src/rebar_utils.erl +++ b/src/rebar_utils.erl @@ -43,8 +43,7 @@ prop_check/3, expand_code_path/0, deprecated/4, deprecated/5, - expand_env_variable/3, - is_skipped_app/0 + expand_env_variable/3 ]). -include("rebar.hrl"). @@ -201,43 +200,6 @@ expand_env_variable(InStr, VarName, RawVarValue) -> re:replace(InStr, RegEx, [VarValue, "\\2"], ReOpts) end. -%% -%% Return: true , if we are in the context of a 'Skipped App', else: false -%% (Example: rebar xref skip_app=mochiweb,webmachine) -is_skipped_app() -> - case rebar_config:get_global(skip_app, undefined) of - undefined -> - %% no skip list - false; - - SkipApps -> - - case string:tokens(SkipApps, ",") of - [] -> - %% no tokens - false; - - SkipAppsTokens -> - - %% Where we are at the moment - Cwd = rebar_utils:get_cwd(), - - %% Return true if app should be skipped - SkipPred = fun(App) -> - case re:run(Cwd, App) of - {match,_} -> true; - _ -> false - end - end, - - %% Check if 'we' are among the skipped apps. - lists:foldl(fun(SkippedApp, Bool) -> - SkipPred(SkippedApp) or Bool - end, false, SkipAppsTokens) - end - end. - - %% ==================================================================== %% Internal functions %% ==================================================================== |