Skip to content

Commit 5bcc04a

Browse files
committed
fix(doc): update Mac and Linux installation instructions
1 parent 3f71b63 commit 5bcc04a

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,12 @@ upctl -h
5959
Setting up bash completion requires a few commands more.
6060

6161
```bash
62+
# If you have not installed bash-completion already
6263
brew install bash-completion
63-
sudo upctl completion bash > /usr/local/etc/bash_completion.d/upctl
64-
echo "[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion" >> ~/.bash_profile
65-
. /usr/local/etc/bash_completion
64+
echo '[ -f "$(brew --prefix)/etc/bash_completion" ] && . "$(brew --prefix)/etc/bash_completion"' >> ~/.bash_profile
65+
66+
upctl completion bash > $(brew --prefix)/etc/bash_completion.d/upctl
67+
. $(brew --prefix)/etc/bash_completion
6668
```
6769

6870
### Linux
@@ -74,20 +76,22 @@ yay -S upcloud-cli
7476

7577
#### Other Linux distros
7678

77-
Use the package corresponding to your distro (deb, rpm, apk), example for Debian like:
79+
Use the package corresponding to your distro (deb, rpm, apk) from the [releases page](https://github.com/UpCloudLtd/upcloud-cli/releases), example for Debian like:
7880

7981
```bash
80-
sudo curl -o upcloud.deb https://github.com/UpCloudLtd/upcloud-cli/releases/download/v<VERSION>/upcloud-cli-<VERSION>_amd64.deb
81-
sudo dpkg -i upcloud.deb
82-
sudo chmod +x /usr/local/bin/upctl
82+
# Replace <VERSION> with the version you want to install
83+
curl -Lo upcloud-cli.deb https://github.com/UpCloudLtd/upcloud-cli/releases/download/v<VERSION>/upcloud-cli-<VERSION>_amd64.deb
84+
sudo dpkg -i upcloud-cli.deb
8385
upctl -h
8486
```
8587

8688
Bash completion can also be set up with some extra commands. You should adapt this for your package manager.
8789
```bash
90+
# If you have not installed bash-completion already
8891
sudo apt install bash-completion
89-
sudo upctl completion bash > /etc/bash_completion.d/upctl
9092
echo "[ -f /etc/bash_completion ] && . /etc/bash_completion" >> ~/.bash_profile
93+
94+
upctl completion bash | sudo tee /etc/bash_completion.d/upctl > /dev/null
9195
. /etc/bash_completion
9296
```
9397

0 commit comments

Comments
 (0)