You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
402 B
12 lines
402 B
#!/usr/local/bin/ruby
|
|
config = File.new("db.rb", "w")
|
|
config.print("require mysql\n")
|
|
print "hostname: "
|
|
hostname = gets
|
|
print "username: "
|
|
username = gets
|
|
print "password: "
|
|
password = gets
|
|
print "dbname: "
|
|
dbname = gets
|
|
config.print("print 'Could not connect to DB' unless $my = Mysql.connect('" + hostname.strip + "', '" + username.strip + "', '" + password.strip + "', '" + dbname.strip + "')\n")
|
|
|