From c8e20690c0fbf1c22676d3384d92e2f14a81e6d4 Mon Sep 17 00:00:00 2001 From: bobslept <38557801+bobslept@users.noreply.github.com> Date: Sun, 3 Sep 2023 23:12:46 +0200 Subject: [PATCH] fix(just): improve JetBrains Toolbox installation (#463) --- usr/share/ublue-os/just/custom.just | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/usr/share/ublue-os/just/custom.just b/usr/share/ublue-os/just/custom.just index 4caad79812b..bb757d1ba8a 100644 --- a/usr/share/ublue-os/just/custom.just +++ b/usr/share/ublue-os/just/custom.just @@ -122,14 +122,20 @@ gnome-extensions: # Install JetBrains Toolbox | https://www.jetbrains.com/toolbox-app/ jetbrains-toolbox: #!/usr/bin/env bash - BUILD_VERSION="2.0.2.16660" - echo "Installing JetBrains Toolbox" pushd "$(mktemp -d)" - curl -sSfL -O https://download.jetbrains.com/toolbox/jetbrains-toolbox-$BUILD_VERSION.tar.gz - curl -sSfL https://download.jetbrains.com/toolbox/jetbrains-toolbox-$BUILD_VERSION.tar.gz.sha256 | sha256sum -c - tar zxf jetbrains-toolbox-$BUILD_VERSION.tar.gz + echo "Get latest JetBrains Toolbox version" + # Get the json with latest releases + curl -sSfL -o releases.json "https://data.services.jetbrains.com/products/releases?code=TBA&latest=true&type=release" + # Extract information + BUILD_VERSION=$(jq -r '.TBA[0].build' ./releases.json) + DOWNLOAD_LINK=$(jq -r '.TBA[0].downloads.linux.link' ./releases.json) + CHECKSUM_LINK=$(jq -r '.TBA[0].downloads.linux.checksumLink' ./releases.json) + echo "Installing JetBrains Toolbox ${BUILD_VERSION}" + curl -sSfL -O "${DOWNLOAD_LINK}" + curl -sSfL "${CHECKSUM_LINK}" | sha256sum -c + tar zxf jetbrains-toolbox-"${BUILD_VERSION}".tar.gz echo "Launching JetBrains Toolbox" - ./jetbrains-toolbox-$BUILD_VERSION/jetbrains-toolbox + ./jetbrains-toolbox-"${BUILD_VERSION}"/jetbrains-toolbox # Install nix and Devbox nix-devbox: