2011-10-18 13:48:05 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class GitNow < Formula
|
2012-02-11 19:59:45 +00:00
|
|
|
homepage 'https://github.com/iwata/git-now'
|
2011-10-18 13:48:05 +00:00
|
|
|
url 'https://github.com/iwata/git-now.git', :tag => 'v0.1.0.9'
|
|
|
|
version '0.1.0.9'
|
2012-02-11 19:59:45 +00:00
|
|
|
|
2011-10-18 13:48:05 +00:00
|
|
|
head 'https://github.com/iwata/git-now.git', :branch => 'develop'
|
|
|
|
|
|
|
|
depends_on 'gnu-getopt'
|
|
|
|
|
|
|
|
def patches
|
|
|
|
DATA
|
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "make", "prefix=#{prefix}", "install"
|
2012-02-11 19:59:45 +00:00
|
|
|
(share+'zsh/functions').install 'etc/_git-now'
|
2011-10-18 13:48:05 +00:00
|
|
|
end
|
|
|
|
|
2012-02-11 19:59:45 +00:00
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
Zsh completion has been installed to:
|
2012-02-05 18:04:39 +00:00
|
|
|
#{share}/zsh/functions
|
|
|
|
EOS
|
|
|
|
end
|
2011-10-18 13:48:05 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
# This patch makes sure GNUtools are used on OSX.
|
|
|
|
# gnu-getopt is keg-only hence the backtick expansion.
|
|
|
|
# These aliases only exist for the duration of git-now,
|
|
|
|
# inside the git-now shells. Normal operation of bash is
|
|
|
|
# unaffected - getopt will still find the version supplied
|
|
|
|
# by OSX in other shells, for example.
|
|
|
|
__END__
|
|
|
|
--- a/git-now
|
|
|
|
+++ b/git-now
|
|
|
|
@@ -1,5 +1,7 @@
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
+alias getopt='`brew --prefix gnu-getopt`/bin/getopt'
|
|
|
|
+
|
|
|
|
# enable debug mode
|
|
|
|
if [ "$DEBUG" = "yes" ]; then
|
|
|
|
set -x
|
|
|
|
|