Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Stats] install.sh fails to install stats app. Here is how to fix it. #171

Open
its-radio opened this issue Dec 7, 2024 · 0 comments
Open

Comments

@its-radio
Copy link

Issue:

Install.sh script fails to install the stats app

Cause:

This line

LATEST_RELEASE_URL=$(curl -s "https://api.github.com/repos/$REPO/releases/latest" | grep "browser_download_url.*spicetify-stats.release.zip" | cut -d '"' -f 4)

returns nothing because https://api.github.com/repos/$REPO/releases/latest only contains information about library at the moment. I assume that it only ever contains information about whichever of either stats or library has been more recently released.

Solution:

A more reliable method of fetching the download URL for the latest release that will work for either stats or library is:

LATEST_RELEASE_URL=$(curl -s "https://api.github.com/repos/$REPO/releases" | grep "browser_download_url.*spicetify-stats.release.zip" | cut -d '"' -f 4 | head -1)

(replace stats with library to make it work with library)

This circumvents the problem of the "latest release" being only one of either stats or library by using the page that contains all the releases, then grepping for the particular app you are interested in, and choosing the latest one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant