Skip to content

Instantly share code, notes, and snippets.

@kraxarn
Created August 25, 2024 16:55
Show Gist options
  • Save kraxarn/dc6964020307d86cc681eba96df8a2cf to your computer and use it in GitHub Desktop.
Save kraxarn/dc6964020307d86cc681eba96df8a2cf to your computer and use it in GitHub Desktop.
#!/bin/bash
DESKTOP_URL="https://raw.githubusercontent.com/kraxarn/spotify-qt/master/res/app/spotify-qt.desktop"
ICON_URL="https://raw.githubusercontent.com/kraxarn/spotify-qt/master/res/logo/spotify-qt.svg"
DESKTOP_PATH="$HOME/.local/share/applications/spotify-qt.desktop"
ICON_PATH="$HOME/.local/share/icons/hicolor/scalable/apps/spotify-qt.svg"
LATEST_RELEASE_URL="https://api.github.com/repos/kraxarn/spotify-qt-nightly/releases/latest"
JQ_DOWNLOAD_URL='.assets.[] | select(.name | endswith(".AppImage")) | .browser_download_url'
DOWNLOAD_URL=`curl "$LATEST_RELEASE_URL" | jq -r "$JQ_DOWNLOAD_URL"`
mkdir -p `dirname "$DESKTOP_PATH"`
mkdir -p `dirname "$ICON_PATH"`
curl -L -o "/usr/bin/spotify-qt" "$DOWNLOAD_URL"
curl -o "$DESKTOP_PATH" "$DESKTOP_URL"
curl -o "$ICON_PATH" "$ICON_URL"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment