From 4fa5fb33cf27c7b8c71f93d1c21b0a6b6a2de207 Mon Sep 17 00:00:00 2001 From: Charlie <60494758+CharlieS1103@users.noreply.github.com> Date: Sun, 30 Oct 2022 19:53:11 -0400 Subject: [PATCH] Update shell install script --- resources/install.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/resources/install.sh b/resources/install.sh index 3cc624fe..07680bb3 100755 --- a/resources/install.sh +++ b/resources/install.sh @@ -4,7 +4,23 @@ set -e - download_uri="https://github.com/spicetify/spicetify-marketplace/archive/refs/heads/dist.zip" + +# download uri +releases_uri=https://github.com/spicetify/spicetify-marketplace/releases +if [ $# -gt 0 ]; then + tag=$1 +else + tag=$(curl -LsH 'Accept: application/json' $releases_uri/latest) + tag=${tag%\,\"update_url*} + tag=${tag##*tag_name\":\"} + tag=${tag%\"} +fi + +tag=${tag#v} + +echo "FETCHING Version $tag" + +download_uri=$releases_uri/download/v$tag/spicetify-marketplace.zip default_color_uri="https://raw.githubusercontent.com/spicetify/spicetify-marketplace/main/resources/color.ini" SPICETIFY_CONFIG_DIR="${SPICETIFY_CONFIG:-$HOME/.config/spicetify}"