Description:
Changed shebang from `/usr/bin/ruby` to `/usr/bin/env ruby`
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
r204:6f1fd9fdb8ac - - 7 files changed: 7 inserted, 7 deleted
@@ -1,25 +1,25 | |||
|
1 | - #!/usr/bin/ruby | |
|
1 | + #!/usr/bin/env ruby | |
|
2 | 2 | |
|
3 | 3 | # new_problem: |
|
4 | 4 | # * creates a directory for a problem in the current directory, |
|
5 | 5 | # * create standard testcase config file |
|
6 | 6 | |
|
7 | 7 | require 'erb' |
|
8 | 8 | |
|
9 | 9 | def process_options(options) |
|
10 | 10 | i = 2 |
|
11 | 11 | while i<ARGV.length |
|
12 | 12 | if ARGV[i]=='-t' |
|
13 | 13 | options[:time_limit] = ARGV[i+1].to_i if ARGV.length>i+1 |
|
14 | 14 | i += 1 |
|
15 | 15 | end |
|
16 | 16 | if ARGV[i]=='-m' |
|
17 | 17 | options[:mem_limit] = ARGV[i+1].to_i if ARGV.length>i+1 |
|
18 | 18 | i += 1 |
|
19 | 19 | end |
|
20 | 20 | i += 1 |
|
21 | 21 | end |
|
22 | 22 | end |
|
23 | 23 | |
|
24 | 24 | |
|
25 | 25 | puts "This script is out of dated, shall be fixed soon" |
@@ -1,25 +1,25 | |||
|
1 | - #!/usr/bin/ruby | |
|
1 | + #!/usr/bin/env ruby | |
|
2 | 2 | |
|
3 | 3 | # |
|
4 | 4 | # This is a check script wrapper. It read all required information |
|
5 | 5 | # and call a real check script call REAL_CHECK_SCRIPT in directory |
|
6 | 6 | # [problem_home]/script |
|
7 | 7 | # |
|
8 | 8 | |
|
9 | 9 | REAL_CHECK_SCRIPT = "<%= script_name %>" |
|
10 | 10 | |
|
11 | 11 | # The REAL_CHECK_SCRIPT is called with: |
|
12 | 12 | # |
|
13 | 13 | # (script) <lang> <test-num> <in-file> <out-file> <ans-file> <full-score> |
|
14 | 14 | # |
|
15 | 15 | # and REAL_CHECK_SCRIPT's output to standard out is redirected to |
|
16 | 16 | # 'check_result' as required by normal check script. |
|
17 | 17 | |
|
18 | 18 | problem_home = ENV['PROBLEM_HOME'] |
|
19 | 19 | require "#{problem_home}/script/test_dsl.rb" |
|
20 | 20 | |
|
21 | 21 | if ARGV.length < 2 |
|
22 | 22 | puts "Usage: check <language> <test-number> [<output-file>]" |
|
23 | 23 | exit(0) |
|
24 | 24 | end |
|
25 | 25 |
@@ -1,25 +1,25 | |||
|
1 | - #!/usr/bin/ruby | |
|
1 | + #!/usr/bin/env ruby | |
|
2 | 2 | |
|
3 | 3 | problem_home = ENV['PROBLEM_HOME'] |
|
4 | 4 | require "#{problem_home}/script/test_dsl.rb" |
|
5 | 5 | |
|
6 | 6 | if ARGV.length < 2 |
|
7 | 7 | puts "Usage: check <language> <test-number> [<output-file>]" |
|
8 | 8 | exit(0) |
|
9 | 9 | end |
|
10 | 10 | |
|
11 | 11 | language = ARGV[0] |
|
12 | 12 | test_num = ARGV[1].to_i |
|
13 | 13 | if ARGV.length >= 3 |
|
14 | 14 | output_file_name = ARGV[2] |
|
15 | 15 | else |
|
16 | 16 | output_file_name = "output.txt" |
|
17 | 17 | end |
|
18 | 18 | |
|
19 | 19 | load "#{problem_home}/test_cases/all_tests.cfg" |
|
20 | 20 | problem = Problem.get_instance |
|
21 | 21 | |
|
22 | 22 | output_file = File.new(output_file_name, "r") |
|
23 | 23 | answer_file = File.new("#{problem_home}/test_cases/#{test_num}/answer-#{test_num}.txt") |
|
24 | 24 | result_file = File.new("check_result", "w") |
|
25 | 25 |
@@ -1,25 +1,25 | |||
|
1 | - #!/usr/bin/ruby | |
|
1 | + #!/usr/bin/env ruby | |
|
2 | 2 | |
|
3 | 3 | problem_home = ENV['PROBLEM_HOME'] |
|
4 | 4 | require "#{problem_home}/script/test_dsl.rb" |
|
5 | 5 | |
|
6 | 6 | if ARGV.length < 2 |
|
7 | 7 | puts "Usage: check <language> <test-number> [<output-file>]" |
|
8 | 8 | exit(0) |
|
9 | 9 | end |
|
10 | 10 | |
|
11 | 11 | language = ARGV[0] |
|
12 | 12 | test_num = ARGV[1].to_i |
|
13 | 13 | if ARGV.length >= 3 |
|
14 | 14 | output_file_name = ARGV[2] |
|
15 | 15 | else |
|
16 | 16 | output_file_name = "output.txt" |
|
17 | 17 | end |
|
18 | 18 | |
|
19 | 19 | load "#{problem_home}/test_cases/all_tests.cfg" |
|
20 | 20 | problem = Problem.get_instance |
|
21 | 21 | |
|
22 | 22 | output_file = File.new(output_file_name, "r") |
|
23 | 23 | answer_file = File.new("#{problem_home}/test_cases/#{test_num}/answer-#{test_num}.txt") |
|
24 | 24 | result_file = File.new("check_result", "w") |
|
25 | 25 |
@@ -1,25 +1,25 | |||
|
1 | - #!/usr/bin/ruby | |
|
1 | + #!/usr/bin/env ruby | |
|
2 | 2 | |
|
3 | 3 | problem_home = ENV['PROBLEM_HOME'] |
|
4 | 4 | require "#{problem_home}/script/test_dsl.rb" |
|
5 | 5 | |
|
6 | 6 | if ARGV.length < 2 |
|
7 | 7 | puts "Usage: check <language> <test-number> [<output-file>]" |
|
8 | 8 | exit(0) |
|
9 | 9 | end |
|
10 | 10 | |
|
11 | 11 | language = ARGV[0] |
|
12 | 12 | test_num = ARGV[1].to_i |
|
13 | 13 | if ARGV.length >= 3 |
|
14 | 14 | output_file_name = ARGV[2] |
|
15 | 15 | else |
|
16 | 16 | output_file_name = "output.txt" |
|
17 | 17 | end |
|
18 | 18 | |
|
19 | 19 | load "#{problem_home}/test_cases/all_tests.cfg" |
|
20 | 20 | problem = Problem.get_instance |
|
21 | 21 | |
|
22 | 22 | output_file = File.new(output_file_name, "r") |
|
23 | 23 | answer_file = File.new("#{problem_home}/test_cases/#{test_num}/answer-#{test_num}.txt") |
|
24 | 24 | result_file = File.new("check_result", "w") |
|
25 | 25 |
@@ -1,25 +1,25 | |||
|
1 | - #!/usr/bin/ruby | |
|
1 | + #!/usr/bin/env ruby | |
|
2 | 2 | |
|
3 | 3 | problem_home = ENV['PROBLEM_HOME'] |
|
4 | 4 | require "#{problem_home}/script/test_dsl.rb" |
|
5 | 5 | |
|
6 | 6 | if ARGV.length < 2 |
|
7 | 7 | puts "Usage: check <language> <test-number> [<output-file>]" |
|
8 | 8 | exit(0) |
|
9 | 9 | end |
|
10 | 10 | |
|
11 | 11 | language = ARGV[0] |
|
12 | 12 | test_num = ARGV[1].to_i |
|
13 | 13 | if ARGV.length >= 3 |
|
14 | 14 | output_file_name = ARGV[2] |
|
15 | 15 | else |
|
16 | 16 | output_file_name = "output.txt" |
|
17 | 17 | end |
|
18 | 18 | |
|
19 | 19 | load "#{problem_home}/test_cases/all_tests.cfg" |
|
20 | 20 | problem = Problem.get_instance |
|
21 | 21 | |
|
22 | 22 | output_file = File.new(output_file_name, "r") |
|
23 | 23 | answer_file = File.new("#{problem_home}/test_cases/#{test_num}/answer-#{test_num}.txt") |
|
24 | 24 | result_file = File.new("check_result", "w") |
|
25 | 25 |
@@ -1,25 +1,25 | |||
|
1 | - #!/usr/bin/ruby | |
|
1 | + #!/usr/bin/env ruby | |
|
2 | 2 | |
|
3 | 3 | problem_home = ENV['PROBLEM_HOME'] |
|
4 | 4 | require "#{problem_home}/script/test_dsl.rb" |
|
5 | 5 | |
|
6 | 6 | if ARGV.length < 2 |
|
7 | 7 | puts "Usage: check <language> <test-number> [<output-file>]" |
|
8 | 8 | exit(0) |
|
9 | 9 | end |
|
10 | 10 | |
|
11 | 11 | language = ARGV[0] |
|
12 | 12 | test_num = ARGV[1].to_i |
|
13 | 13 | if ARGV.length >= 3 |
|
14 | 14 | output_file_name = ARGV[2] |
|
15 | 15 | else |
|
16 | 16 | output_file_name = "output.txt" |
|
17 | 17 | end |
|
18 | 18 | |
|
19 | 19 | load "#{problem_home}/test_cases/all_tests.cfg" |
|
20 | 20 | problem = Problem.get_instance |
|
21 | 21 | |
|
22 | 22 | output_file = File.new(output_file_name, "r") |
|
23 | 23 | answer_file = File.new("#{problem_home}/test_cases/#{test_num}/answer-#{test_num}.txt") |
|
24 | 24 | result_file = File.new("check_result", "w") |
|
25 | 25 |
You need to be logged in to leave comments.
Login now