Commit d4ecaffa authored by Jan Klass's avatar Jan Klass

Improve usage help on missing parameters

parent 828a6295
......@@ -6,10 +6,18 @@ include("crawldata.jl")
include("crawl.jl")
include("check.jl")
function print_usage()
println("Usage: <action> <param>")
println("<action>:")
println(" crawl <base URL>")
println(" check <base URL>")
end
filenames = Filenames()
if length(ARGS) != 2
@error "Parameters <action> and <param> are required"
print_usage()
exit(1)
end
action = ARGS[1]
......@@ -23,10 +31,7 @@ try
check(param)
else
@error "Unknown action $action"
println("Usage: <action> <param>")
println("<action>:")
println(" crawl <base URL>")
println(" check <base URL>")
print_usage()
exit(1)
end
catch ex
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment