Blame erlang-find-provides.escript

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