File size: 545 Bytes
d5bfab8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env ruby

=begin
Run "maintenance" job inside the "loda-outlier-programs" repository.
=end

require_relative 'config'

LODA_OUTLIER_PROGRAMS_DIR = Config.instance.loda_outlier_programs_repository
unless Dir.exist?(LODA_OUTLIER_PROGRAMS_DIR)
    raise "No such dir #{LODA_OUTLIER_PROGRAMS_DIR}, cannot run script"
end

script_path = File.join(LODA_OUTLIER_PROGRAMS_DIR, "script")
unless Dir.exist?(script_path)
    raise "No such dir #{script_path}, cannot run script"
end

Dir.chdir(script_path) do
    system("rake maintenance")
end