Skip to content

Commit 2dc9c1a

Browse files
cicd: get.sh (#4)
1 parent ee9183a commit 2dc9c1a

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ The best music player.
1414

1515
## Installation
1616

17+
### Script
18+
19+
```
20+
curl -s -o- https://raw.githubusercontent.com/lautarodragan/jolteon/refs/heads/main/get.sh | bash
21+
```
22+
1723
### Binaries
1824

1925
Jolteon is available for Linux and MacOS (both Apple Silicon and Intel).

get.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/env bash
2+
3+
JSON=`curl -s 'https://api.github.com/repos/lautarodragan/jolteon/releases/latest'`
4+
5+
URLS=`echo "$JSON" | jq -r ".assets[].browser_download_url"`
6+
# curl -s 'https://api.github.com/repos/lautarodragan/jolteon/releases/latest' | grep "browser_download_url"
7+
8+
DOWNLOAD_URL=""
9+
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
10+
DOWNLOAD_URL=`echo "$URLS" | grep linux`
11+
elif [[ "$OSTYPE" == "darwin"* ]]; then
12+
# echo "$URLS" | grep darwin
13+
if [[ `uname -m` == "arm64" ]]; then
14+
DOWNLOAD_URL=`echo "$URLS" | grep darwin | grep aarch`
15+
elif [[ "$OSTYPE" == "x86_64" ]]; then
16+
DOWNLOAD_URL=`echo "$URLS" | grep darwin`
17+
else
18+
echo error
19+
exit 1
20+
fi
21+
else
22+
echo "No release found for your OS."
23+
echo "If you're running on one of the supported OSes (Linux, MacOS Intel/ARM), then this is a bug in the installation script."
24+
echo "Please report this by submitting a bug to https://github.com/lautarodragan/jolteon/issues."
25+
exit 1
26+
fi
27+
28+
echo "Downloading $DOWNLOAD_URL..."
29+
30+
curl -s -L -O "$DOWNLOAD_URL"
31+
32+
echo "Extracting..."
33+
34+
tar xzf jolteon*.tar.gz

0 commit comments

Comments
 (0)