Avoid hardcoding escript name.
This commit is contained in:
parent
3e83a0e928
commit
0be58dc525
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user