Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ The best music player.

## Installation

### Script

```
curl -s -o- https://raw.githubusercontent.com/lautarodragan/jolteon/refs/heads/main/get.sh | bash
```

### Binaries

Jolteon is available for Linux and MacOS (both Apple Silicon and Intel).
Expand Down
34 changes: 34 additions & 0 deletions get.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/env bash

JSON=`curl -s 'https://api.github.com/repos/lautarodragan/jolteon/releases/latest'`

URLS=`echo "$JSON" | jq -r ".assets[].browser_download_url"`
# curl -s 'https://api.github.com/repos/lautarodragan/jolteon/releases/latest' | grep "browser_download_url"

DOWNLOAD_URL=""
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
DOWNLOAD_URL=`echo "$URLS" | grep linux`
elif [[ "$OSTYPE" == "darwin"* ]]; then
# echo "$URLS" | grep darwin
if [[ `uname -m` == "arm64" ]]; then
DOWNLOAD_URL=`echo "$URLS" | grep darwin | grep aarch`
elif [[ "$OSTYPE" == "x86_64" ]]; then
DOWNLOAD_URL=`echo "$URLS" | grep darwin`
else
echo error
exit 1
fi
else
echo "No release found for your OS."
echo "If you're running on one of the supported OSes (Linux, MacOS Intel/ARM), then this is a bug in the installation script."
echo "Please report this by submitting a bug to https://github.com/lautarodragan/jolteon/issues."
exit 1
fi

echo "Downloading $DOWNLOAD_URL..."

curl -s -L -O "$DOWNLOAD_URL"

echo "Extracting..."

tar xzf jolteon*.tar.gz