aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorMotonori Iwata2011-10-18 22:48:05 +0900
committerJack Nagel2011-10-26 18:34:18 -0500
commitf6511d738a10df5dc16ff7b378486347f7cf218c (patch)
tree777ee9f7be632d46acabda1a2585fad7a1e3eae3 /Library/Formula
parentda53d686321e3dee27b30639d7cc9f550ac8c55c (diff)
downloadhomebrew-f6511d738a10df5dc16ff7b378486347f7cf218c.tar.bz2
New formula: git-now
Closes #8169. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/git-now.rb48
1 files changed, 48 insertions, 0 deletions
diff --git a/Library/Formula/git-now.rb b/Library/Formula/git-now.rb
new file mode 100644
index 000000000..37ae7bb42
--- /dev/null
+++ b/Library/Formula/git-now.rb
@@ -0,0 +1,48 @@
+require 'formula'
+
+class GitNow < Formula
+ url 'https://github.com/iwata/git-now.git', :tag => 'v0.1.0.9'
+ version '0.1.0.9'
+ head 'https://github.com/iwata/git-now.git', :branch => 'develop'
+ homepage 'https://github.com/iwata/git-now'
+
+ depends_on 'gnu-getopt'
+
+ def options
+ [
+ ['--zsh-completion', "copy zsh completion function file to #{share}/zsh/functions"]
+ ]
+ end
+
+ def patches
+ DATA
+ end
+
+ def install
+ system "make", "prefix=#{prefix}", "install"
+ if ARGV.include? '--zsh-completion'
+ zsh_functions_d = share + 'zsh/functions'
+ zsh_functions_d.install "etc/_git-now"
+ end
+ end
+
+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
+