Skip to content

Commit 6b11b66

Browse files
committed
chore(readme): Add steps of switching to the suitable branch
1 parent eb7fb90 commit 6b11b66

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

readme.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,19 @@ Feel free to add your official package manager.
4646

4747
The files should be placed inside of the `~/.nano/` directory.
4848

49-
You can put the files in another directory inside the correct `.nano` folder.
50-
For example: `~/.nano/nanorc/`.
51-
For readability will use `$install_path` for the path of your choose (in *system wide* the path is always `/usr/share/nano-syntax-highlighting/`).
49+
You may put the files to a different directory, for example to `~/.nano/nanorc/`.
50+
For readability, we use `$install_path` to represent the path of your choice (in *system wide* the path is always `/usr/share/nano-syntax-highlighting/`).
5251

53-
For user, only run:
52+
For single user, run:
5453

55-
`git clone [email protected]:galenguyer/nano-syntax-highlighting.git $install_path` or
56-
`git clone https://github.com/galenguyer/nano-syntax-highlighting.git $install_path`
54+
- `git clone [email protected]:galenguyer/nano-syntax-highlighting.git $install_path`
55+
- or with HTTPS: `git clone https://github.com/galenguyer/nano-syntax-highlighting.git $install_path`
56+
- and then switch to the suitable branch: `$install_path/tool/switch-branch.sh`
5757

5858
For system wide, run:
5959

60-
`sudo git clone https://github.com/galenguyer/nano-syntax-highlighting.git $install_path`
60+
- `sudo git clone https://github.com/galenguyer/nano-syntax-highlighting.git $install_path`
61+
- `$install_path/tool/switch-branch.sh`
6162

6263
## Configuration
6364

tool/switch-branch.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#! /usr/bin/env bash
22

3-
base="$(dirname "$0")/../"
4-
branch=$("$base/install.sh" --find_suitable_branch)
3+
cd "$(dirname "$0")/../"
4+
55
verstr=$(nano --version 2>/dev/null | awk '/GNU nano/ {print ($3=="version")? $4: substr($5,2)}')
6+
branch=$(./install.sh --find_suitable_branch)
67

78
echo "Current nano version: ${verstr}"
89
echo "Switching to ${branch}"

0 commit comments

Comments
 (0)