Browse Source

start gproc in rebar3 shell; support GPROC_DIST

Ulf Wiger 8 years ago
parent
commit
4dd2718099
3 changed files with 18 additions and 3 deletions
  1. 6 0
      dist_shell.config
  2. 1 0
      rebar.config
  3. 11 3
      rebar.config.script

+ 6 - 0
dist_shell.config

@@ -0,0 +1,6 @@
+%% -*- erlang-mode -*-
+[
+ {gproc, [
+	  {gproc_dist, all}
+	 ]}
+].

+ 1 - 0
rebar.config

@@ -16,3 +16,4 @@
              {top_level_readme,
              {top_level_readme,
               {"./README.md",
               {"./README.md",
                "http://github.com/uwiger/gproc"}}]}.
                "http://github.com/uwiger/gproc"}}]}.
+{shell, [{apps, [gproc]}]}.

+ 11 - 3
rebar.config.script

@@ -17,9 +17,17 @@ CFG1 = case os:getenv("REBAR_DEPS") of
 Priv = filename:join(filename:dirname(SCRIPT), "priv").
 Priv = filename:join(filename:dirname(SCRIPT), "priv").
 CFG2 = case os:getenv("GPROC_DIST") of
 CFG2 = case os:getenv("GPROC_DIST") of
 	   "true" ->
 	   "true" ->
-	       CFG1;
+	       Sh = proplists:get_value(shell, CFG1, []),
+	       case lists:keymember(config, 1, Sh) of
+		   true ->
+		       CFG1;
+		   false ->
+		       lists:keystore(
+			 shell, 1, CFG1,
+			 {shell, [{config, "dist_shell.config"}|Sh]})
+	       end;
 	   F when F=="false"; F==false ->
 	   F when F=="false"; F==false ->
-	       Script(Priv, "remove_deps.script",
-		      [{'CONFIG', CFG1}, {'DEPS', [gen_leader]}])
+		 Script(Priv, "remove_deps.script",
+			[{'CONFIG', CFG1}, {'DEPS', [gen_leader]}])
        end.
        end.
 Script(Priv, "check_edown.script", [{'CONFIG', CFG2}]).
 Script(Priv, "check_edown.script", [{'CONFIG', CFG2}]).