Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Khramtsov <ekhramtsov@process-one.net>2019-06-14 23:19:08 +0300
committerEvgeny Khramtsov <ekhramtsov@process-one.net>2019-06-14 23:19:08 +0300
commit56a0e736c79906fd3f231ab72c3c07ce22722fca (patch)
tree50ff698410e9ddfcd3776d96503d511aaa30dd03
parentcfaed70fe31598178e09889186174368e7cb9051 (diff)
Accept output argument in tools/opt_types.sh
-rw-r--r--Makefile.in2
-rwxr-xr-xtools/opt_types.sh8
2 files changed, 5 insertions, 5 deletions
diff --git a/Makefile.in b/Makefile.in
index ca20ffc3d..0f933ad45 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -123,7 +123,7 @@ hooks: all
tools/hook_deps.sh ebin
options: all
- tools/opt_types.sh ebin
+ tools/opt_types.sh ejabberd_option ebin
translations:
tools/prepare-tr.sh
diff --git a/tools/opt_types.sh b/tools/opt_types.sh
index 17c229bae..a5c475970 100755
--- a/tools/opt_types.sh
+++ b/tools/opt_types.sh
@@ -11,7 +11,7 @@
specs = #{} :: map(),
mod_specs = #{} :: map()}).
-main(Paths) ->
+main([Mod|Paths]) ->
State = fold_beams(
fun(File, Form, StateAcc) ->
append(Form, File, StateAcc)
@@ -19,13 +19,13 @@ main(Paths) ->
emit_modules(map_to_specs(State#state.m_opts,
State#state.mod_defaults,
State#state.mod_specs)),
- emit_config(map_to_specs(State#state.g_opts,
+ emit_config(Mod,
+ map_to_specs(State#state.g_opts,
State#state.defaults,
State#state.specs),
State#state.globals).
-emit_config(Specs, Globals) ->
- Mod = "ejabberd_option",
+emit_config(Mod, Specs, Globals) ->
File = filename:join("src", Mod ++ ".erl"),
case file:open(File, [write]) of
{ok, Fd} ->