homebrew-core/Formula/direnv.rb
Jack Nagel 7c648d9732 Shore up a number of shell quoting issues
When interpolating in strings passed to Formula#system, it should be
done in such a way that if any interpolated variables contain spaces,
they are either (a) passed as part of a list or (b) protected by quotes
if they are part of a long string (which is subject to shell expansion).
Otherwise, they will be split on the space when expanded by the shell
and passed as multiple arguments to whatever process is being executed.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-05-15 14:03:11 -05:00

22 lines
529 B
Ruby

require 'formula'
class Direnv < Formula
homepage 'http://www.direnv.net'
url 'https://github.com/zimbatm/direnv/tarball/v0.1.127'
md5 '0a0f7a2d738b97c8976fe7e28c4e062c'
head 'https://github.com/zimbatm/direnv.git'
def install
system "make", "install", "DESTDIR=#{prefix}"
end
def caveats; <<-EOS.undent
At the END of your ~/.bashrc or ~/.zshrc, add the following line:
eval `direnv hook $0`
See the wiki for docs and examples:
https://github.com/zimbatm/direnv/wiki/
EOS
end
end