aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/google-sql-tool.rb
blob: 065e70d48bc57639f24b843cfa0176e886e753ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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'
  md5 'dc6a5a88e2163c3f2677c55d5aa502ff'
  version 'r9'

  def install
    # Patch script to find jar
    inreplace 'google_sql.sh',
      'SQL_SH_DIR="$(cd $(dirname $0); pwd)"',
      "SQL_SH_DIR=\"#{libexec}\""

    libexec.install %w(google_sql.sh google_sql.jar)
    bin.install_symlink libexec+('google_sql.sh') => 'google_sql'
  end
end