Skip to content

Commit

Permalink
Merge pull request #289 from atomiyama/misc/modify_installation
Browse files Browse the repository at this point in the history
ADD installation from source section to README.
  • Loading branch information
Nate Smith committed Feb 4, 2020
2 parents 109a45c + 4ee098f commit 1b9b76d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ Install and upgrade:

### Other platforms

Install a prebuilt binary from the [releases page][] or source compile by running `make` from the
project directory.
Install a prebuilt binary from the [releases page][]

### [Build from source](/source.md)

<!-- TODO eventually we'll have https://cli.github.com/manual -->
[docs]: https://cli.github.io/cli/gh
Expand Down
31 changes: 31 additions & 0 deletions source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Installation from source

1. Clone cli into `~/.githubcli`
```
$ git clone https://github.com/cli/cli.git ~/.githubcli
```

2. Compile
```
$ cd ~/.githubcli && make
```

3. Add `~/.githubcli/bin` to your $PATH for access to the gh command-line utility.

* For **bash**:
~~~ bash
$ echo 'export PATH="$HOME/.githubcli/bin:$PATH"' >> ~/.bash_profile
~~~

* For **Zsh**:
~~~ zsh
$ echo 'export PATH="$HOME/.githubcli/bin:$PATH"' >> ~/.zshrc
~~~

* For **Fish shell**:
~~~ fish
$ set -Ux fish_user_paths $HOME/.githubcli/bin $fish_user_paths
~~~

4. Restart your shell so that PATH changes take effect.

0 comments on commit 1b9b76d

Please sign in to comment.