28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# File 'lib/multi_compress/db_deployment.rb', line 28
def run(argv)
command = argv.shift
case command
when "package"
PackageCommand.new.run(argv)
when "view"
ViewCommand.new.run(argv)
when "registry"
RegistryCommand.new.run(argv)
when "help", "--help", "-h", nil
puts help
0
else
raise OptionParser::InvalidOption, "unknown db command: #{command.inspect}"
end
rescue OptionParser::ParseError, Error => e
warn "multi_compress db: #{e.message}"
2
rescue SystemCallError, IOError => e
warn "multi_compress db: #{e.message}"
1
end
|