From 17e2944051d2e2689c5fb3679ea42023f253cbc1 Mon Sep 17 00:00:00 2001 From: atomiyama Date: Sun, 2 Feb 2020 01:48:00 +0900 Subject: [PATCH 1/2] Modify installation section. --- README.md | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 47ceed220..5440f274f 100644 --- a/README.md +++ b/README.md @@ -52,8 +52,38 @@ MSI installers are available on the [releases page][]. ### 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 + +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. [docs]: https://cli.github.io/cli/gh From 4ee098ff1f8a2a11fd9f7fac7d31f9a1f0c690d5 Mon Sep 17 00:00:00 2001 From: atomiyama Date: Tue, 4 Feb 2020 10:12:35 +0900 Subject: [PATCH 2/2] split installation section; build source into `source.md` and linking to from README. --- README.md | 31 +------------------------------ source.md | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 30 deletions(-) create mode 100644 source.md diff --git a/README.md b/README.md index 5440f274f..7b8b28723 100644 --- a/README.md +++ b/README.md @@ -54,36 +54,7 @@ MSI installers are available on the [releases page][]. Install a prebuilt binary from the [releases page][] -### Build 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. +### [Build from source](/source.md) [docs]: https://cli.github.io/cli/gh diff --git a/source.md b/source.md new file mode 100644 index 000000000..da27f29fe --- /dev/null +++ b/source.md @@ -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. +