Permalink
Browse files

rebar.config.script was only a symlink

  • Loading branch information...
1 parent d16e15c commit 301ccd2838af072ee154b93abdd2c8e5abb97fa3 @uwiger committed Jan 11, 2013
Showing with 25 additions and 1 deletion.
  1. +0 −1 rebar.config.script
  2. +25 −0 rebar.config.script
View
1 rebar.config.script
View
25 rebar.config.script
@@ -0,0 +1,25 @@
+%% -*- erlang -*-
+Script = fun(D,S,Vs) ->
+ Scr = filename:join(D, S),
+ case file:script(Scr, orddict:store('SCRIPT', Scr, Vs)) of
+ {ok, Res} -> Res;
+ {error,_} = Err ->
+ io:fwrite("Error evaluating script ~s~n", [S]),
+ Err
+ end
+ end.
+CFG1 = case os:getenv("REBAR_DEPS") of
+ false -> CONFIG;
+ [] -> CONFIG;
+ Dir ->
+ lists:keystore(deps_dir, 1, CONFIG, {deps_dir, Dir})
+ end.
+Priv = filename:join(filename:dirname(SCRIPT), "priv").
+CFG2 = case os:getenv("GPROC_DIST") of
+ "true" ->
+ CFG1;
+ F when F=="false"; F==false ->
+ Script(Priv, "remove_deps.script",
+ [{'CONFIG', CFG1}, {'DEPS', [gen_leader]}])
+ end.
+Script(Priv, "check_edown.script", [{'CONFIG', CFG2}]).

0 comments on commit 301ccd2

Please sign in to comment.