Skip to content

Commit 4e14121

Browse files
committed
Fix Linux install commands
The Linux install commands relied on grepping for `browser_download_url` in the latest release JSON. Unfortunately there are more than one occurrence of that string, and it produces an incorrect download URL. Modify the Linux install commands to instead grep for the latest version, and then explicitly generate the download URL based on that. Signed-off-by: Andrew Seigner <[email protected]>
1 parent 1591262 commit 4e14121

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
Run the following command:
22

33
```shell
4-
curl -Ls $(curl -s https://api.github.com/repos/replicatedhq/replicated/releases/latest \
5-
| grep "browser_download_url.*linux_amd64.tar.gz" \
6-
| cut -d : -f 2,3 \
7-
| tr -d \") -o replicated.tar.gz
4+
version=$(curl -s https://api.github.com/repos/replicatedhq/replicated/releases/latest \
5+
| grep -m1 -Po '"tag_name":\s*"v\K[^"]+')
6+
curl -Ls \
7+
"https://github.com/replicatedhq/replicated/releases/download/v${version}/replicated_${version}_linux_amd64.tar.gz" \
8+
-o replicated.tar.gz
89
tar xf replicated.tar.gz replicated && rm replicated.tar.gz
910
mv replicated /usr/local/bin/replicated
10-
```
11+
```

0 commit comments

Comments
 (0)