Browse files

mysql: added pidof dependency, changed PATH in mysql.server

1. Added dependency on pidof.  This is necessary for
"mysql.server status" to work fully.
2. Added #{HOMEBREW_PREFIX}/bin to PATH in mysql.server
so that it can find Homebrew-installed pidof.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
  • Loading branch information...
1 parent 4582838 commit 46b835bf73a778141e283b8c62ea8c14035dca74 @dinkypumpkin dinkypumpkin committed with adamv Apr 13, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 Library/Formula/mysql.rb
View
6 Library/Formula/mysql.rb
@@ -7,6 +7,7 @@ class Mysql < Formula
depends_on 'cmake' => :build
depends_on 'readline'
+ depends_on 'pidof'
fails_with_llvm "https://github.com/mxcl/homebrew/issues/issue/144"
@@ -65,7 +66,10 @@ def install
# Link the setup script into bin
ln_s prefix+'scripts/mysql_install_db', bin+'mysql_install_db'
- # Link the startup script into bin
+ # Fix up the control script and link into bin
+ inreplace "#{prefix}/support-files/mysql.server" do |s|
+ s.gsub!(/^(PATH=".*)(")/, "\\1:#{HOMEBREW_PREFIX}/bin\\2")
+ end
ln_s "#{prefix}/support-files/mysql.server", bin
end

0 comments on commit 46b835b

Please sign in to comment.