aboutsummaryrefslogtreecommitdiffstats
path: root/lib/sasl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2013-10-01 14:16:21 +0200
committerDan Gudmundsson <[email protected]>2013-10-03 15:16:42 +0200
commitbc966c32bfb52467f4fd527995c110c0a980527c (patch)
tree97282e9e6f7e5a60e5080f36a7f5e15cb96dcc59 /lib/sasl
parentc5459f9ba0e8b3568a34788bfd596f5f6be9fca2 (diff)
downloadotp-bc966c32bfb52467f4fd527995c110c0a980527c.tar.gz
otp-bc966c32bfb52467f4fd527995c110c0a980527c.tar.bz2
otp-bc966c32bfb52467f4fd527995c110c0a980527c.zip
sasl: Add no_dot_erlang start script
Sometimes it is wanted to start erlang without loading the user dependent .erlang file, for example in scripts and configure tests.
Diffstat (limited to 'lib/sasl')
-rw-r--r--lib/sasl/src/systools_make.erl18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/sasl/src/systools_make.erl b/lib/sasl/src/systools_make.erl
index b2e95fdbee..bab88552f9 100644
--- a/lib/sasl/src/systools_make.erl
+++ b/lib/sasl/src/systools_make.erl
@@ -1135,10 +1135,10 @@ generate_script(Output, Release, Appls, Flags) ->
load_appl_mods(Appls, Mandatory ++ Preloaded,
PathFlag, Variables) ++
[{path, create_path(Appls, PathFlag, Variables)}] ++
- create_kernel_procs(Appls) ++
- create_load_appls(Appls) ++
- create_start_appls(Appls) ++
- script_end()
+ create_kernel_procs(Appls) ++
+ create_load_appls(Appls) ++
+ create_start_appls(Appls) ++
+ script_end(lists:member(no_dot_erlang, Flags))
},
ScriptFile = Output ++ ".script",
@@ -1229,9 +1229,12 @@ create_load_appls([]) ->
%%______________________________________________________________________
%% The final part of the script.
-script_end() ->
+script_end(false) -> %% Do not skip loading of $HOME/.erlang
[{apply, {c, erlangrc, []}},
- {progress, started}].
+ {progress, started}];
+script_end(true) -> %% Ignore loading of $HOME/.erlang
+ [{progress, started}].
+
%%-----------------------------------------------------------------
%% Function: sort_appls(Appls) -> {ok, Appls'} | throw({error, Error})
@@ -2055,6 +2058,9 @@ cas([no_warn_sasl | Args], X) ->
%%% no_module_tests (kept for backwards compatibility, but ignored) ----
cas([no_module_tests | Args], X) ->
cas(Args, X);
+cas([no_dot_erlang | Args], X) ->
+ cas(Args, X);
+
%%% ERROR --------------------------------------------------------------
cas([Y | Args], X) ->
cas(Args, X++[Y]).