postgresql: move caveats to commands.
Mirrors the `mysql` formula. Instead of telling people to type commands actually run them for them instead. Also, use the shorter, foreground manual run. Closes Homebrew/homebrew#24437.
This commit is contained in:
parent
618815b254
commit
8e4169c7e7
1 changed files with 7 additions and 5 deletions
|
@ -68,12 +68,14 @@ class Postgresql < Formula
|
|||
system "make install-world"
|
||||
end
|
||||
|
||||
def post_install
|
||||
unless File.exist? "#{var}/postgres"
|
||||
system "#{bin}/initdb", "#{var}/postgres", '-E', 'utf8'
|
||||
end
|
||||
end
|
||||
|
||||
def caveats
|
||||
s = <<-EOS.undent
|
||||
initdb #{var}/postgres -E utf8 # create a database cluster
|
||||
postgres -D #{var}/postgres # serve that database
|
||||
PGDATA=#{var}/postgres postgres # …alternatively
|
||||
|
||||
If builds of PostgreSQL 9 are failing and you have version 8.x installed,
|
||||
you may need to remove the previous version first. See:
|
||||
https://github.com/mxcl/homebrew/issues/issue/2510
|
||||
|
@ -94,7 +96,7 @@ class Postgresql < Formula
|
|||
EOS
|
||||
end
|
||||
|
||||
plist_options :manual => "pg_ctl -D #{HOMEBREW_PREFIX}/var/postgres -l #{HOMEBREW_PREFIX}/var/postgres/server.log start"
|
||||
plist_options :manual => "postgres -D #{HOMEBREW_PREFIX}/var/postgres"
|
||||
|
||||
def plist; <<-EOS.undent
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
|
Loading…
Reference in a new issue