Browse Source

fix build to external dir

Maxim Sokhatsky 11 years ago
parent
commit
5ad7232b32
4 changed files with 3 additions and 7 deletions
  1. BIN
      mad
  2. 2 3
      rebar.config
  3. 0 1
      src/mad.erl
  4. 1 3
      src/mad_deps.erl

BIN
mad


+ 2 - 3
rebar.config

@@ -1,6 +1,5 @@
 {cache,"~/.mad/repos"}.
-{deps_dir,"../../mad-deps"}.
+{deps_dir,"deps"}.
 {deps, [
-        {getopt, ".*",   {git, "git@github.com:jcomellas/getopt.git", {tag, "v0.8.2"}}},
-        {n2o, ".*",   {git, "git@github.com:5HT/n2o.git", master}}
+        {getopt, ".*",   {git, "git@github.com:jcomellas/getopt.git", {tag, "v0.8.2"}}}
        ]}.

+ 0 - 1
src/mad.erl

@@ -42,7 +42,6 @@ main(Args) ->
                 deps_fetch -> skip;
                 Dir -> file:make_dir(Dir) end,
             FetchDir = mad_utils:get_value(deps_dir, Conf, ["deps"]),
-            io:format("Make Fetch Dir: ~p",[FetchDir]),
             file:make_dir(FetchDir),
             mad_deps:fetch(Cwd, Conf, ConfigFile, Deps)
     end.

+ 1 - 3
src/mad_deps.erl

@@ -39,7 +39,7 @@ fetch_dep(Cwd, Config, ConfigFile, Name, Cmd, Uri, Co, Cache) ->
         Dir -> filename:join([Dir,get_publisher(Uri),Name]) end,
 
     Opts = ["clone", Uri, TrunkPath ],
-    io:format("dependency: ~s~n", [Name]),
+    io:format("==> dependency: ~p tag: ~p~n", [Uri,Co]),
     %% fetch
     mad_utils:exec(Cmd, Opts),
     put(Name, fetched),
@@ -57,9 +57,7 @@ fetch_dep(Cwd, Config, ConfigFile, Name, Cmd, Uri, Co, Cache) ->
 -spec build_dep(directory(), any(), string(), string(), string(), string(), string(), string()) -> ok.
 build_dep(Cwd, Conf, _ConfFile, Publisher, Name, Cmd, Co, Dir) ->
     TrunkPath = filename:join([Dir, Publisher, Name]),
-    io:format("Cache Dir: ~p~n",[TrunkPath]),
     DepsDir = filename:join([mad_utils:get_value(deps_dir, Conf, ["deps"]),Name]),
-    io:format("Deps Dir: ~p~n",[DepsDir]),
     mad_utils:exec("cp", ["-r", TrunkPath, DepsDir]),
     ok = file:set_cwd(DepsDir),
     mad_utils:exec(Cmd, ["checkout", lists:concat([Co])]),