Description:
[grader] fix an option bug for import_problem git-svn-id: http://theory.cpe.ku.ac.th/grader/judge/trunk/scripts@110 6386c4cd-e34a-4fa8-8920-d93eb39b512e
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r27:914f6c15de62 - - 1 file changed: 2 inserted, 2 deleted

@@ -21,7 +21,7
21 end
21 end
22
22
23 def process_options(options)
23 def process_options(options)
24 - i = 3
24 + i = 4
25 while i<ARGV.length
25 while i<ARGV.length
26 if ARGV[i]=='-t'
26 if ARGV[i]=='-t'
27 options[:time_limit] = ARGV[i+1].to_i if ARGV.length>i+1
27 options[:time_limit] = ARGV[i+1].to_i if ARGV.length>i+1
@@ -38,7 +38,7
38 SCRIPT_DIR = File.dirname(__FILE__)
38 SCRIPT_DIR = File.dirname(__FILE__)
39
39
40 # print usage
40 # print usage
41 - if ARGV.length < 4
41 + if (ARGV.length < 4) or (ARGV[3][0,1]=="-")
42 puts <<USAGE
42 puts <<USAGE
43 using: import_problem name dir num check [options]
43 using: import_problem name dir num check [options]
44 where: name = problem_name [
44 where: name = problem_name [
You need to be logged in to leave comments. Login now