Blame erlang-find-provides.escript
|
Peter Lemenkov |
91a119 |
#!/usr/bin/escript
|
|
Peter Lemenkov |
91a119 |
%% -*- erlang -*-
|
|
Peter Lemenkov |
91a119 |
|
|
Peter Lemenkov |
91a119 |
main(EbinFiles) ->
|
|
Peter Lemenkov |
91a119 |
lists:foreach(
|
|
Peter Lemenkov |
91a119 |
fun(BeamFile) ->
|
|
Peter Lemenkov |
91a119 |
try
|
|
Peter Lemenkov |
91a119 |
{ok, {Module, [{exports,Exports}]}} = beam_lib:chunks(BeamFile, [exports]),
|
|
Peter Lemenkov |
91a119 |
case Module of
|
|
Peter Lemenkov |
91a119 |
eunit_test -> io:format ("erlang(eunit_test:nonexisting_function/0)~n");
|
|
Peter Lemenkov |
91a119 |
wx -> io:format ("erlang(demo:start/0)~n");
|
|
Peter Lemenkov |
91a119 |
_ -> ok
|
|
Peter Lemenkov |
91a119 |
end,
|
|
Peter Lemenkov |
91a119 |
lists:foreach( fun({ModFun,Arity})->io:format("erlang(~p:~s/~p)~n", [Module, ModFun,Arity]) end, Exports)
|
|
Peter Lemenkov |
91a119 |
catch
|
|
Peter Lemenkov |
91a119 |
_:_ ->
|
|
Peter Lemenkov |
91a119 |
ok
|
|
Peter Lemenkov |
91a119 |
end
|
|
Peter Lemenkov |
91a119 |
end,
|
|
Peter Lemenkov |
91a119 |
EbinFiles);
|
|
Peter Lemenkov |
91a119 |
|
|
Peter Lemenkov |
91a119 |
main(_) ->
|
|
Peter Lemenkov |
91a119 |
halt(1).
|
|
Peter Lemenkov |
91a119 |
|