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