Skip to content

Commit

Permalink
update installation instructions to prefer rake install
Browse files Browse the repository at this point in the history
Don't suggest standalone install via curl anymore because:

- hub may not be a single script in the near future
- `rake install` handles the Windows executable as well
  • Loading branch information
mislav committed Oct 3, 2013
1 parent b120857 commit fe50488
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
30 changes: 11 additions & 19 deletions README.md
Expand Up @@ -31,27 +31,29 @@ Installing on OS X is easiest with Homebrew:
$ brew install hub
~~~

### Standalone
### `rake install` from source

`hub` is easily installed as a standalone script:
This is the preferred installation method without when no package manager that
supports hub is available:

~~~ sh
$ curl http://hub.github.com/standalone -sLo ~/bin/hub &&
chmod +x ~/bin/hub
# Download or clone the project from GitHub:
$ git clone git://github.com/github/hub.git
$ cd hub
$ rake install
~~~

Assuming "~/bin/" is in your `$PATH`, you're ready to roll:
On a Unix-based OS, this installs under `PREFIX`, which is `/usr/local` by default.

Now you should be ready to roll:

~~~ sh
$ hub version
git version 1.7.6
hub version 1.8.3
~~~

#### On Windows

If you have mysysgit, open "Git Bash" and follow the steps above but put the
`hub` executable in `/bin` instead of `~/bin`.
#### Windows "Git Bash" (mysysgit) note

Avoid aliasing hub as `git` due to the fact that mysysgit automatically
configures your prompt to include git information, and you want to avoid slowing
Expand All @@ -78,16 +80,6 @@ $ hub hub standalone > ~/bin/hub && chmod +x ~/bin/hub
This installs a standalone version which doesn't require RubyGems to
run, so it's faster.

### Source

You can also install from source:

~~~ sh
$ git clone git://github.com/github/hub.git
$ cd hub
$ rake install prefix=/usr/local
~~~

### Help! It's slow!

#### Is `hub` noticeably slower than plain git?
Expand Down
4 changes: 3 additions & 1 deletion Rakefile
Expand Up @@ -104,7 +104,9 @@ end
desc "Build standalone script"
task :standalone => "hub"

desc "Install standalone script and man pages if unix-based OS. If Windows, install executable and .bat file inside ruby/bin"
desc %{Install standalone script and man page.
On Unix-based OS, installs into PREFIX (default: `/usr/local`).
On Windows, installs into Ruby's main bin directory.}
task :install => "hub" do
require 'rbconfig'
if RbConfig::CONFIG['host_os'] =~ /mswin|mingw/
Expand Down

0 comments on commit fe50488

Please sign in to comment.