Skip to content

Commit 1b9b76d

Browse files
author
Nate Smith
authored
Merge pull request cli#289 from atomiyama/misc/modify_installation
ADD installation from source section to README.
2 parents 109a45c + 4ee098f commit 1b9b76d

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ Install and upgrade:
6969

7070
### Other platforms
7171

72-
Install a prebuilt binary from the [releases page][] or source compile by running `make` from the
73-
project directory.
72+
Install a prebuilt binary from the [releases page][]
73+
74+
### [Build from source](/source.md)
7475

7576
<!-- TODO eventually we'll have https://cli.github.com/manual -->
7677
[docs]: https://cli.github.io/cli/gh

source.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Installation from source
2+
3+
1. Clone cli into `~/.githubcli`
4+
```
5+
$ git clone https://github.com/cli/cli.git ~/.githubcli
6+
```
7+
8+
2. Compile
9+
```
10+
$ cd ~/.githubcli && make
11+
```
12+
13+
3. Add `~/.githubcli/bin` to your $PATH for access to the gh command-line utility.
14+
15+
* For **bash**:
16+
~~~ bash
17+
$ echo 'export PATH="$HOME/.githubcli/bin:$PATH"' >> ~/.bash_profile
18+
~~~
19+
20+
* For **Zsh**:
21+
~~~ zsh
22+
$ echo 'export PATH="$HOME/.githubcli/bin:$PATH"' >> ~/.zshrc
23+
~~~
24+
25+
* For **Fish shell**:
26+
~~~ fish
27+
$ set -Ux fish_user_paths $HOME/.githubcli/bin $fish_user_paths
28+
~~~
29+
30+
4. Restart your shell so that PATH changes take effect.
31+

0 commit comments

Comments
 (0)