Blame erlang-find-requires.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, [{imports,Imports}]}} = beam_lib:chunks(BeamFile, [imports]),
Peter Lemenkov 7748c2
				lists:foreach( fun({ModName,ModFun,Arity})->io:format("erlang(~s:~s/~p)~n", [ModName,ModFun,Arity]) end, Imports)
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