Create datadir in post install.

* Fixes formula when bottled.

Closes Homebrew/homebrew#26840.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Finn Smith 2014-02-19 13:48:52 -05:00 committed by Adam Vandenberg
parent 0e8c8d79ca
commit d51e5eaacc

View file

@ -119,12 +119,11 @@ class PerconaServer < Formula
# Move mysqlaccess to libexec
mv "#{bin}/mysqlaccess", libexec
mv "#{bin}/mysqlaccess.conf", libexec
# Make sure that data directory exists
datadir.mkpath
end
def post_install
# Make sure that data directory exists
datadir.mkpath
unless File.exist? "#{datadir}/mysql/user.frm"
ENV['TMPDIR'] = nil
system "#{bin}/mysql_install_db", "--verbose", "--user=#{ENV["USER"]}",