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