Blame erlang-find-provides.escript

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