Avoid hardcoding escript name.

This commit is contained in:
Juan Jose Comellas 2009-12-17 15:34:48 -03:00
parent 3e83a0e928
commit 0be58dc525

View File

@ -16,10 +16,9 @@
-author('juanjo@comellas.org'). -author('juanjo@comellas.org').
main([]) -> main([]) ->
getopt:usage(option_spec_list(), "ex1.escript"); getopt:usage(option_spec_list(), escript:script_name());
main(Args) -> main(Args) ->
OptSpecList = option_spec_list(), OptSpecList = option_spec_list(),
io:format("For command line: ~p~n" io:format("For command line: ~p~n"
"getopt:parse/2 returns:~n~n", [Args]), "getopt:parse/2 returns:~n~n", [Args]),
case getopt:parse(OptSpecList, Args) of case getopt:parse(OptSpecList, Args) of