diff options
author | Matthew Sackman <matthew@rabbitmq.com> | 2011-05-27 12:17:06 +0100 |
---|---|---|
committer | Matthew Sackman <matthew@rabbitmq.com> | 2011-05-27 12:17:06 +0100 |
commit | 0789c270868aef8676bc5e1c389f6051c48b8b00 (patch) | |
tree | bb1ba9f8564b2c5f3b3f5304c37b088f109bdd1d /generate_app | |
parent | e42b14f7a1378cada2ca6994472be83b5411446f (diff) | |
download | rabbitmq-server-0789c270868aef8676bc5e1c389f6051c48b8b00.tar.gz |
In light of bug21782, solve the asymmetry problem the other way.bug24079
Diffstat (limited to 'generate_app')
-rw-r--r-- | generate_app | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/generate_app b/generate_app index d8813542..fb0eb1ea 100644 --- a/generate_app +++ b/generate_app @@ -1,16 +1,16 @@ #!/usr/bin/env escript %% -*- erlang -*- -main([TargetFile | SrcDirs]) -> +main([InFile, OutFile | SrcDirs]) -> Modules = [list_to_atom(filename:basename(F, ".erl")) || SrcDir <- SrcDirs, F <- filelib:wildcard("*.erl", SrcDir)], - {ok, {application, Application, Properties}} = io:read(''), + {ok, [{application, Application, Properties}]} = file:consult(InFile), NewProperties = case proplists:get_value(modules, Properties) of [] -> lists:keyreplace(modules, 1, Properties, {modules, Modules}); _ -> Properties end, file:write_file( - TargetFile, + OutFile, io_lib:format("~p.~n", [{application, Application, NewProperties}])). |