mirror of
https://github.com/iwata/git-now.git
synced 2026-09-10 07:26:29 -04:00
Merge branch 'hotfix/0.1.0.9' into develop
This commit is contained in:
commit
04ef9c061d
16
README.mdown
16
README.mdown
|
|
@ -37,31 +37,27 @@ If you're on a Mac and use [homebrew](http://github.com/mxcl/homebrew), it's sim
|
|||
$ brew install https://github.com/iwata/git-now/raw/master/git-now.rb
|
||||
|
||||
#### install options
|
||||
* use ``gnu-getopt``
|
||||
|
||||
$ brew install --gnu-getopt https://github.com/iwata/git-now/raw/master/git-now.rb
|
||||
|
||||
* copy zsh completion function for zsh users
|
||||
* ``--zsh-completion``<br />copy zsh completion function for zsh users
|
||||
|
||||
$ brew install --zsh-completion https://github.com/iwata/git-now/raw/master/git-now.rb
|
||||
|
||||
Show details
|
||||
Show details
|
||||
|
||||
$ brew options https://github.com/iwata/git-now/raw/master/git-now.rb
|
||||
$ brew options https://github.com/iwata/git-now/raw/master/git-now.rb
|
||||
|
||||
### Manual installation
|
||||
If you prefer a manual installation, please use the following instructions:
|
||||
|
||||
$ git clone --recursive git://github.com/iwata/git-now.git
|
||||
$ git clone --recursive git://github.com/iwata/git-now.git
|
||||
|
||||
Then, you can install `git-now`, using:
|
||||
|
||||
$ sudo make install
|
||||
$ sudo make install
|
||||
|
||||
By default, git-now will be installed in /usr/local. To change the prefix
|
||||
where git-now will be installed, simply specify it explicitly, using:
|
||||
|
||||
$ sudo make prefix=/opt/local install
|
||||
$ sudo make prefix=/opt/local install
|
||||
|
||||
Or simply point your `PATH` environment variable to your git-now checkout
|
||||
directory.
|
||||
|
|
|
|||
36
git-now.rb
36
git-now.rb
|
|
@ -1,31 +1,30 @@
|
|||
require 'formula'
|
||||
|
||||
class GitNow < Formula
|
||||
url 'https://github.com/iwata/git-now.git', :tag => 'v0.1.0.8.1'
|
||||
version '0.1.0.8.1'
|
||||
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'
|
||||
|
||||
def options
|
||||
[
|
||||
['--gnu-getopt', "Link a gnu-getopt formula"],
|
||||
['--zsh-completion', "copy zsh completion function file to #{share}/zsh/functions"]
|
||||
]
|
||||
end
|
||||
|
||||
# for longopt
|
||||
if ARGV.include? '--gnu-getopt'
|
||||
depends_on 'gnu-getopt'
|
||||
def patches
|
||||
DATA
|
||||
end
|
||||
|
||||
# for longopt
|
||||
depends_on 'gnu-getopt'
|
||||
|
||||
if ARGV.include? '--zsh-completion'
|
||||
depends_on 'zsh'
|
||||
end
|
||||
|
||||
def install
|
||||
system "make", "prefix=#{prefix}", "install"
|
||||
if ARGV.include? '--gnu-getopt'
|
||||
system "brew ln gnu-getopt"
|
||||
end
|
||||
if ARGV.include? '--zsh-completion'
|
||||
zsh_functions_d = share + 'zsh/functions'
|
||||
zsh_functions_d.install "etc/_git-now"
|
||||
|
|
@ -33,3 +32,22 @@ class GitNow < Formula
|
|||
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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue