anchor.diff:              ok
       end,
       compile_app(Dir).
  +
  +compile_app(Dir) ->
  +    SrcDir = src(Dir),
  +    IncDir = include(Dir),
  +    case file:list_dir(SrcDir) of
  +        {ok, Files} ->
  +            EbinDir = ebin(Dir),
  +            lists:foreach(compile_fun(SrcDir, EbinDir, IncDir), Files);
  +        {error, _} ->
  +            ok
  +    end.
   
   compile_deps([]) ->
       ok;
  
positive.code:     end,
      compile_deps(T).
  
  compile_app(Dir) ->
      SrcDir = src(Dir),
      IncDir = include(Dir),
      case file:list_dir(SrcDir) of
          {ok, Files} ->
              EbinDir = ebin(Dir),
              lists:foreach(compile_fun(SrcDir, EbinDir, IncDir), Files);
          {error, _} ->
              ok
      end.
  
  exec(Cmd, Opts) ->
      Opts1 = [concat([" ", X]) || X <- Opts],
      os:cmd(concat([Cmd, concat(Opts1)])).
  
negative.code:             end
      end.
  
  %% read rebar.config file and return the {deps, V}
  deps(RebarFile) ->
      case file:consult(RebarFile) of
          {ok, Conf} ->
              case lists:keyfind(deps, 1, Conf) of
                  {deps, Deps} ->
                      {ok, Deps};
                  _ ->
                      {ok, []}
              end;
          Else ->
              Else
      end.
  
  do_clone_deps([]) ->
      ok;
  do_clone_deps([{Name, _, Repo}|T]) ->
      Name1 = atom_to_list(Name),
      {Cmd, Url, Co} = Repo,
  
      %% branch/tag it should checkout to
      Co1 = case Co of
                {_, V} -> V;
                Else -> Else
            end,
      Name2 = make_dep_name(Name1, Co1),
  
      %% command options: clone url path/to/dep -b Branch/Tag
      Opts = ["clone", Url, get_path(Name2), "-b", Co1],
      io:format("dependency: ~s~n", [Name1]),
  
      %% run the command
      exec(Cmd, Opts),
  
      %% check dependencies of the dependency
      case deps(rebar_config_file(get_path(Name2))) of
          {ok, Deps} ->
              do_clone_deps(Deps);
          {error, _} ->
              ok
      end,
      do_clone_deps(T).
  