2011-10-21 12:20:45 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class GoogleSqlTool < Formula
|
|
|
|
homepage 'https://developers.google.com/cloud-sql/docs/commandline'
|
|
|
|
url 'http://dl.google.com/cloudsql/tools/google_sql_tool.zip'
|
2012-09-04 03:05:44 +00:00
|
|
|
sha1 '67111a75a1c37b34527b3954795b179f62e88632'
|
|
|
|
version 'r10'
|
2011-10-21 12:20:45 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
# Patch script to find jar
|
2012-09-04 03:05:44 +00:00
|
|
|
system "chmod +w google_sql.sh" # WTF
|
2011-10-21 12:20:45 +00:00
|
|
|
inreplace 'google_sql.sh',
|
|
|
|
'SQL_SH_DIR="$(cd $(dirname $0); pwd)"',
|
|
|
|
"SQL_SH_DIR=\"#{libexec}\""
|
|
|
|
|
|
|
|
libexec.install %w(google_sql.sh google_sql.jar)
|
2012-02-12 19:48:54 +00:00
|
|
|
bin.install_symlink libexec+('google_sql.sh') => 'google_sql'
|
2011-10-21 12:20:45 +00:00
|
|
|
end
|
|
|
|
end
|