class Object

Public Instance Methods

die(msg) click to toggle source
# File bin/s3-mysql-backup, line 10
def die(msg)
  puts "ERROR: #{msg}"
  exit 1
end
main() click to toggle source
# File bin/s3-mysql-backup, line 29
def main
  process_options

  die "Missing configuration file." unless File.exists?($CONFIG_FILE_NAME)

  S3MysqlBackup.new($DATABASE, $CONFIG_FILE_NAME).run
end
process_options() click to toggle source
# File bin/s3-mysql-backup, line 23
def process_options
  usage unless ARGV.size == 2
  $DATABASE         = ARGV.first
  $CONFIG_FILE_NAME = File.expand_path(ARGV.last)
end
usage() click to toggle source
# File bin/s3-mysql-backup, line 15
def usage
  puts <<-END
Usage: s3-mysql-backup DATABASE CONFIG_FILE

END
  exit 1
end