Rewrite caveats to new style.

To make it easier to copy and paste multiline scripts from caveats,
no longer use $ as a prompt marker.
This commit is contained in:
Adam Vandenberg 2011-04-04 16:56:47 -07:00
parent 024996a8da
commit edfb67d937
14 changed files with 70 additions and 72 deletions

View file

@ -13,7 +13,7 @@ class Cpansearch < Formula
def caveats; <<-EOS.undent
For usage instructions:
$ more #{prefix}/README.md
more #{prefix}/README.md
EOS
end
end

View file

@ -34,9 +34,9 @@ class Fontforge < Formula
fontforge is an X11 application.
To install the Mac OS X wrapper application run:
$ brew linkapps
brew linkapps
or:
$ sudo ln -s #{prefix}/FontForge.app /Applications
sudo ln -s #{prefix}/FontForge.app /Applications
EOS
end
end

View file

@ -13,12 +13,12 @@ class Htop < Formula
rm_rf "#{share}/pixmaps"
end
def caveats; <<-EOS
For htop to display correctly all running processes, it needs to run as root.
If you don't want to `sudo htop` every time, change the owner and permissions:
$ cd #{bin}
$ chmod 6555 htop
$ sudo chown root htop
def caveats; <<-EOS.undent
For htop to display correctly all running processes, it needs to run as root.
If you don't want to `sudo htop` every time, change the owner and permissions:
cd #{bin}
chmod 6555 htop
sudo chown root htop
EOS
end
end

View file

@ -61,22 +61,20 @@ class Llvm < Formula
system "make" # separate steps required, otherwise the build fails
system "make install"
if build_clang?
Dir.chdir clang_dir do
system "make install"
end
end
Dir.chdir clang_dir do
system "make install"
end if build_clang?
end
def caveats; <<-EOS
If you already have LLVM installed, then "brew upgrade llvm" might not
work. Instead, try:
$ brew rm llvm
$ brew install llvm
def caveats; <<-EOS.undent
If you already have LLVM installed, then "brew upgrade llvm" might not work.
Instead, try:
brew rm llvm & brew install llvm
EOS
end
end
__END__
diff --git a/Makefile.rules b/Makefile.rules
index 9cff105..44d5b2d 100644

View file

@ -80,9 +80,9 @@ class Macvim < Formula
#{prefix}
To link the application to a normal Mac OS X location:
$ brew linkapps
brew linkapps
or:
$ sudo ln -s #{prefix}/MacVim.app /Applications
sudo ln -s #{prefix}/MacVim.app /Applications
EOS
end
end

View file

@ -65,37 +65,38 @@ class Mysql < Formula
def caveats; <<-EOS.undent
Set up databases to run AS YOUR USER ACCOUNT with:
$ unset TMPDIR
$ mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=#{var}/mysql --tmpdir=/tmp
unset TMPDIR
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=#{var}/mysql --tmpdir=/tmp
To set up base tables in another folder, or use a differnet user to run
mysqld, view the help for mysqld_install_db:
$ mysql_install_db --help
mysql_install_db --help
and view the MySQL documentation:
* http://dev.mysql.com/doc/refman/5.5/en/mysql-install-db.html
* http://dev.mysql.com/doc/refman/5.5/en/default-privileges.html
To run as, for instance, user "mysql", you may need to `sudo`:
$ sudo mysql_install_db ...options...
sudo mysql_install_db ...options...
Start mysqld manually with:
$ mysqld_safe &
mysqld_safe &
To connect:
$ mysql -uroot
mysql -uroot
To launch on startup:
* if this is your first install:
$ mkdir -p ~/Library/LaunchAgents
$ cp #{prefix}/com.mysql.mysqld.plist ~/Library/LaunchAgents/
$ launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
mkdir -p ~/Library/LaunchAgents
cp #{prefix}/com.mysql.mysqld.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
* if this is an upgrade and you already have the com.mysql.mysqld.plist loaded:
$ launchctl unload -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
$ cp #{prefix}/com.mysql.mysqld.plist ~/Library/LaunchAgents/
$ launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
launchctl unload -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
cp #{prefix}/com.mysql.mysqld.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
You may need to edit the plist to use the correct "UserName".
You may also need to edit the plist to use the correct "UserName".
EOS
end

View file

@ -11,13 +11,7 @@ class N2n < Formula
end
def caveats; <<-EOF.undent
To link correctly you need to have access to the /usr/local/sbin
and link n2n
$ chown `whoami`:staff /usr/local/sbin
$ brew link n2n
n2n also requires the tun/tap devices. To get these on OS X:
n2n requires the tun/tap devices. To get these on OS X:
http://tuntaposx.sourceforge.net/download.xhtml
EOF
end

View file

@ -21,7 +21,7 @@ class Nazghul < Formula
def caveats; <<-EOS.undent
The built-in game for this engine is called Haxima. To run:
$ haxima.sh
haxima.sh
EOS
end
end

View file

@ -106,8 +106,8 @@ class Python < Formula
You may want to symlink this Framework to a standard OS X location,
such as:
mkdir ~/Frameworks
ln -s "#{prefix}/Frameworks/Python.framework" ~/Frameworks
mkdir ~/Frameworks
ln -s "#{prefix}/Frameworks/Python.framework" ~/Frameworks
EOS
general_caveats = <<-EOS.undent
@ -120,8 +120,8 @@ class Python < Formula
Distribute has been installed, so easy_install is available.
To update distribute itself outside of Homebrew:
$ easy_install pip
$ pip install --upgrade distribute
#{scripts_folder}/easy_install pip
#{scripts_folder}/pip install --upgrade distribute
See: https://github.com/mxcl/homebrew/wiki/Homebrew-and-Python
EOS
@ -144,7 +144,7 @@ private
# The Cellar location of site-packages
def site_packages
effective_lib + "python2.7/site-packages"
effective_lib+"python2.7/site-packages"
end
# The HOMEBREW_PREFIX location of site-packages

View file

@ -20,22 +20,23 @@ class Runit < Formula
# names added to package/commands. Read the file for the commands and
# install them in homebrew.
rcmds = File.open("package/commands").read
rcmds.each do |r|
bin.install("command/#{r.chomp}")
man8.install("man/#{r.chomp}.8")
end
(var + "service").mkpath
end
def caveats
<<-END_CAVEATS
This formula does not install runit as a replacement for init.
The service directory is #{var}/service instead of /service.
To have runit ready to run services, start runsvdir:
def caveats; <<-EOS.undent
This formula does not install runit as a replacement for init.
The service directory is #{var}/service instead of /service.
$ runsvdir -P #{var}
To have runit ready to run services, start runsvdir:
runsvdir -P #{var}
Depending on the services managed by runit, this may need to start as root.
END_CAVEATS
Depending on the services managed by runit, this may need to start as root.
EOS
end
end

View file

@ -6,7 +6,7 @@ class Siege < Formula
sha1 'ee0a0c3a9e6559cf8cbaf717649f6684b0d9643a'
def install
#to avoid unnecessary warning due to hardcoded path
# To avoid unnecessary warning due to hardcoded path, create the folder first
(prefix+'etc').mkdir
system "./configure",
"--prefix=#{prefix}",
@ -16,18 +16,20 @@ class Siege < Formula
system "make install"
end
def caveats; <<-EOS
Mac OS X has only 16K ports available that won't be released until socket
TIME_WAIT is passed. The default timeout for TIME_WAIT is 15 seconds. Consider
reducing in case of available port bottleneck. You can check whether tis is a
problem with netstat.
def caveats; <<-EOS.undent
Mac OS X has only 16K ports available that won't be released until socket
TIME_WAIT is passed. The default timeout for TIME_WAIT is 15 seconds.
Consider reducing in case of available port bottleneck.
$ sysctl net.inet.tcp.msl
net.inet.tcp.msl: 15000
$ sudo sysctl -w net.inet.tcp.msl=1000
net.inet.tcp.msl: 15000 -> 1000
You can check whether this is a problem with netstat:
Run siege.config to create the ~/.siegerc config file.
# sysctl net.inet.tcp.msl
net.inet.tcp.msl: 15000
# sudo sysctl -w net.inet.tcp.msl=1000
net.inet.tcp.msl: 15000 -> 1000
Run siege.config to create the ~/.siegerc config file.
EOS
end
end

View file

@ -22,10 +22,10 @@ class Solr < Formula
def caveats; <<-EOS.undent
To start solr:
$ solr path/to/solr/config/dir
solr path/to/solr/config/dir
See the solr homepage for more setup information:
$ brew home solr
brew home solr
EOS
end
end

View file

@ -11,11 +11,13 @@ class Ttytter < ScriptFileFormula
def caveats; <<-EOS.undent
To take full advantage of readline features you must install readline:
$ brew install readline
brew install readline
and the Perl Module Term::ReadLine::TTYtter
$ cpan -i Term::ReadLine::TTYtter
cpan -i Term::ReadLine::TTYtter
Or if you have cpanminus:
$ cpanm Term::ReadLine::TTYtter
cpanm Term::ReadLine::TTYtter
EOS
end
end

View file

@ -46,7 +46,7 @@ class Zeromq < Formula
def caveats; <<-EOS.undent
To install the zmq gem on 10.6 with the system Ruby on a 64-bit machine,
you may need to do:
$ ARCHFLAGS="-arch x86_64" gem install zmq -- --with-zmq-dir=#{HOMEBREW_PREFIX}
ARCHFLAGS="-arch x86_64" gem install zmq -- --with-zmq-dir=#{HOMEBREW_PREFIX}
If you want to later build the Java bindings from https://github.com/zeromq/jzmq,
you will need to obtain the Java Developer Package from Apple ADC