diff options
author | Ben Hood <0x6e6562@gmail.com> | 2009-11-05 14:43:08 +0000 |
---|---|---|
committer | Ben Hood <0x6e6562@gmail.com> | 2009-11-05 14:43:08 +0000 |
commit | 1dd1714e10a70ac0765f3062e79d23e00ade2000 (patch) | |
tree | 700eab5983fbcdde0e3807f11b9aa069233d0e73 /generate_app | |
parent | d79eb60d0c74d3591a2b470a44eca0b09e540b2f (diff) | |
parent | 3e86a1b9881957309d432c8b2e5f295a07f8f920 (diff) | |
download | rabbitmq-server-1dd1714e10a70ac0765f3062e79d23e00ade2000.tar.gz |
Merged default into bug21775bug21775
Diffstat (limited to 'generate_app')
-rw-r--r-- | generate_app | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/generate_app b/generate_app index 62301292..576b485e 100644 --- a/generate_app +++ b/generate_app @@ -1,10 +1,12 @@ #!/usr/bin/env escript %% -*- erlang -*- -main([BeamDir]) -> +main([BeamDir, TargetFile]) -> Modules = [list_to_atom(filename:basename(F, ".beam")) || F <- filelib:wildcard("*.beam", BeamDir)], {ok, {application, Application, Properties}} = io:read(''), NewProperties = lists:keyreplace(modules, 1, Properties, {modules, Modules}), - io:format("~p.", [{application, Application, NewProperties}]). + file:write_file( + TargetFile, + io_lib:format("~p.~n", [{application, Application, NewProperties}])). |