소스 검색

First basic pass at deps

pull/3/head
Dave Smith 15 년 전
부모
커밋
1fe4d13e25
1개의 변경된 파일25개의 추가작업 그리고 1개의 파일을 삭제
  1. +25
    -1
      src/rebar_deps.erl

+ 25
- 1
src/rebar_deps.erl 파일 보기

@ -33,4 +33,28 @@
%% ===================================================================
preprocess(Config, _) ->
{ok, Config, []}.
%% Get the directory where we will place downloaded deps
DepsDir = rebar_config:get(Config, deps_dir, "deps"),
%% Process the list of deps from the configuration
Dirs = process_deps(rebar_config:get(Config, deps, []), [], DepsDir),
{ok, Config, Dirs}.
%% ===================================================================
%% Internal functions
%% ===================================================================
process_deps([], Acc, _Dir) ->
Acc;
process_deps([App | Rest], Acc, Dir) when is_atom(App) ->
case code:lib_dir(App) of
{error, bad_name} ->
%% The requested app is not available on the code path
?ABORT("~s: Dependency ~s not available.\n",
[rebar_utils:get_cwd(), App]);
Path ->
?INFO("Dependency ~s -> ~s\n", [App, Path])
end,
process_deps(Rest, Acc, Dir).

불러오는 중...
취소
저장