rubber: improve shebang replacement pattern

The old pattern assumed that python was installed via homebrew, which is
not necessarily true.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Dave Goodell 2012-03-20 21:49:36 -05:00 committed by Adam Vandenberg
parent 556b3e0ae1
commit a7c069110a

View file

@ -21,7 +21,7 @@ class Rubber < Formula
# Don't need to peg to a specific Python version
Dir["#{bin}/*"].each do |f|
inreplace f, "#{HOMEBREW_PREFIX}/bin/python", "/usr/bin/env python"
inreplace f, /^#!.*\/python.*$/, "#!/usr/bin/env python"
end
end
end