aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/drush.rb
blob: 5434501da89c7c378f73202d628dbdef38856f05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require 'formula'

class Drush < Formula
  homepage 'https://github.com/drush-ops/drush'
  head 'https://github.com/drush-ops/drush.git'
  url 'https://github.com/drush-ops/drush/archive/6.3.0.tar.gz'
  sha1 '90fde5acfbd6feefad02453ee9f31a0ac6d2f80e'

  def install
    prefix.install_metafiles
    libexec.install Dir['*'] - ['drush.bat']
    (bin+'drush').write <<-EOS.undent
      #!/bin/sh

      export ETC_PREFIX=${ETC_PREFIX:=#{HOMEBREW_PREFIX}}
      export SHARE_PREFIX=${SHARE_PREFIX:=#{HOMEBREW_PREFIX}}

      exec "#{libexec}/drush" "$@"
    EOS
    bash_completion.install libexec/'drush.complete.sh' => 'drush'
  end
end