2011-10-21 12:20:45 +00:00
|
|
|
class GoogleSqlTool < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Command-line tool for executing common SQL statements"
|
2015-06-29 14:58:02 +00:00
|
|
|
homepage "https://cloud.google.com/sql/docs/mysql-client"
|
2015-03-10 21:20:14 +00:00
|
|
|
url "https://dl.google.com/cloudsql/tools/google_sql_tool.zip"
|
|
|
|
sha256 "b7e993edab12da32772bfa90c13999df728f06792757c496140d729d230b03c3"
|
|
|
|
version "r10"
|
2011-10-21 12:20:45 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
# Patch script to find jar
|
2015-03-10 21:20:14 +00:00
|
|
|
chmod 0755, "google_sql.sh"
|
|
|
|
inreplace "google_sql.sh",
|
2011-10-21 12:20:45 +00:00
|
|
|
'SQL_SH_DIR="$(cd $(dirname $0); pwd)"',
|
|
|
|
"SQL_SH_DIR=\"#{libexec}\""
|
|
|
|
|
2015-03-10 21:20:14 +00:00
|
|
|
libexec.install ["google_sql.sh", "google_sql.jar"]
|
|
|
|
bin.install_symlink libexec+("google_sql.sh") => "google_sql"
|
2011-10-21 12:20:45 +00:00
|
|
|
end
|
|
|
|
end
|