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:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r27:914f6c15de62 - - 1 file changed: 2 inserted, 2 deleted
@@ -21,7 +21,7 | |||
|
21 | 21 | end |
|
22 | 22 | |
|
23 | 23 | def process_options(options) |
|
24 |
- i = |
|
|
24 | + i = 4 | |
|
25 | 25 | while i<ARGV.length |
|
26 | 26 | if ARGV[i]=='-t' |
|
27 | 27 | options[:time_limit] = ARGV[i+1].to_i if ARGV.length>i+1 |
@@ -38,7 +38,7 | |||
|
38 | 38 | SCRIPT_DIR = File.dirname(__FILE__) |
|
39 | 39 | |
|
40 | 40 | # print usage |
|
41 | - if ARGV.length < 4 | |
|
41 | + if (ARGV.length < 4) or (ARGV[3][0,1]=="-") | |
|
42 | 42 | puts <<USAGE |
|
43 | 43 | using: import_problem name dir num check [options] |
|
44 | 44 | where: name = problem_name [ |
You need to be logged in to leave comments.
Login now