Browse Source

selective update

Maxim Sokhatsky 10 years ago
parent
commit
4866389ebd
2 changed files with 6 additions and 2 deletions
  1. BIN
      mad
  2. 6 2
      src/mad_deps.erl

BIN
mad


+ 6 - 2
src/mad_deps.erl

@@ -2,11 +2,15 @@
 -copyright('Sina Samavati').
 -copyright('Sina Samavati').
 -compile(export_all).
 -compile(export_all).
 
 
-up(_) ->
+up(Params) ->
+    List = case Params of
+                [] -> [ F || F<- mad_repl:wildcards(["deps/*"]), filelib:is_dir(F) ];
+                Apps -> [ "deps/"++A || A <- Apps ] end,
+    os:cmd("git pull"),
   [ begin
   [ begin
     io:format("==> up: ~p~n", [F]),
     io:format("==> up: ~p~n", [F]),
     os:cmd(io_lib:format("cd ~s && git pull",[F]))
     os:cmd(io_lib:format("cd ~s && git pull",[F]))
-    end || F<- mad_repl:wildcards(["deps/*"]), filelib:is_dir(F)].
+    end || F <- List ].
 
 
 fetch(_, _Config, _, []) -> ok;
 fetch(_, _Config, _, []) -> ok;
 fetch(Cwd, Config, ConfigFile, [H|T]) when is_tuple(H) =:= false -> fetch(Cwd, Config, ConfigFile, T);
 fetch(Cwd, Config, ConfigFile, [H|T]) when is_tuple(H) =:= false -> fetch(Cwd, Config, ConfigFile, T);