Skip to content
This repository
Browse code

rebar.config.script was only a symlink

  • Loading branch information...
commit 301ccd2838af072ee154b93abdd2c8e5abb97fa3 1 parent d16e15c
Ulf Wiger authored January 11, 2013
1  rebar.config.script
25  rebar.config.script
... ...
@@ -0,0 +1,25 @@
  1
+%% -*- erlang -*-
  2
+Script = fun(D,S,Vs) ->
  3
+		 Scr = filename:join(D, S),
  4
+		 case file:script(Scr, orddict:store('SCRIPT', Scr, Vs)) of
  5
+		     {ok, Res} -> Res;
  6
+		     {error,_} = Err ->
  7
+			 io:fwrite("Error evaluating script ~s~n", [S]),
  8
+			 Err
  9
+		 end
  10
+	 end.
  11
+CFG1 = case os:getenv("REBAR_DEPS") of
  12
+	   false -> CONFIG;
  13
+	   [] -> CONFIG;
  14
+	   Dir ->
  15
+	       lists:keystore(deps_dir, 1, CONFIG, {deps_dir, Dir})
  16
+       end.
  17
+Priv = filename:join(filename:dirname(SCRIPT), "priv").
  18
+CFG2 = case os:getenv("GPROC_DIST") of
  19
+	   "true" ->
  20
+	       CFG1;
  21
+	   F when F=="false"; F==false ->
  22
+	       Script(Priv, "remove_deps.script",
  23
+		      [{'CONFIG', CFG1}, {'DEPS', [gen_leader]}])
  24
+       end.
  25
+Script(Priv, "check_edown.script", [{'CONFIG', CFG2}]).

0 notes on commit 301ccd2

Please sign in to comment.
Something went wrong with that request. Please try again.