Skip to content

Commit

Permalink
cleanup busted mysql_install_db
Browse files Browse the repository at this point in the history
  • Loading branch information
atmos committed Aug 16, 2011
1 parent d2f591b commit 86c4712
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion cookbooks/homebrew/providers/homebrew.rb
Expand Up @@ -66,7 +66,7 @@ def install_package(name, version)
system("#{PREFIX}/bin/initdb #{PREFIX}/var/postgres > /dev/null 2>&1")
end
when "mysql"
unless ::File.directory?("#{PREFIX}/var/mysql")
unless ::File.directory?("#{PREFIX}/var/mysql/mysql")
prefix = `brew --prefix mysql`.chomp
system("unset TMPDIR; #{PREFIX}/bin/mysql_install_db --user=#{ENV['USER']} --basedir=#{prefix} --datadir=#{PREFIX}/var/mysql --tmpdir=/tmp > /dev/null")
end
Expand Down
10 changes: 0 additions & 10 deletions cookbooks/homebrew/recipes/dbs.rb
Expand Up @@ -13,13 +13,3 @@
homebrew_db "memcached"
homebrew_db "postgresql"
homebrew_db "mysql"

script "configuring mysqld" do
interpreter "bash"
code <<-EOS
source ~/.cinderella.profile
if [[ ! -d ~/Developer/var/mysql ]]; then
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=#{ENV['HOME']}/Developer/var/mysql --tmpdir=/tmp
fi
EOS
end

0 comments on commit 86c4712

Please sign in to comment.