homebrew-core/Formula/pow.rb
Geoffrey ROGUELON e00734b385 pow: fix installation caveats.
Add the backslashes in the caveats of Pow formula. The backslashes are
necessary otherwise if the user copies the commands and pastes them in
Terminal, the space of "Application Support" breaks the command.

Reverse the order of ln command in order to respect the documentation of
Pow which says that the .pow directory in user home must be a symbolic link
of Hosts directory. See the note of section 2.1
(http://pow.cx/manual.html#section_2.1).

Closes Homebrew/homebrew#23366.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-10-19 14:35:54 +01:00

34 lines
923 B
Ruby

require 'formula'
class Pow < Formula
homepage 'http://pow.cx/'
url 'http://get.pow.cx/versions/0.4.1.tar.gz'
sha1 '46976c6eea914ec78ba424b919e8928e4fc9a6bf'
depends_on 'node'
def install
libexec.install Dir['*']
(bin/'pow').write <<-EOS.undent
#!/bin/sh
export POW_BIN="#{HOMEBREW_PREFIX}/bin/pow"
exec "#{HOMEBREW_PREFIX}/bin/node" "#{libexec}/lib/command.js" "$@"
EOS
end
def caveats;
<<-EOS.undent
Create the required host directories:
mkdir -p ~/Library/Application\\ Support/Pow/Hosts
ln -s ~/Library/Application\\ Support/Pow/Hosts ~/.pow
Setup port 80 forwarding and launchd agents:
sudo pow --install-system
pow --install-local
Load launchd agents:
sudo launchctl load -w /Library/LaunchDaemons/cx.pow.firewall.plist
launchctl load -w ~/Library/LaunchAgents/cx.pow.powd.plist
EOS
end
end