linutil/core/tabs/applications-setup/developer-tools/jetbrains-toolbox.sh
Jeevitha Kannan K S e373f2cde8
refact: categorize dev scripts & add zed editor installation (#929)
* feat: Add zed editor -> developer tools

* Rename dir Developer-tools -> developer-tools

* Rename files from application-setup.sh -> application.sh

The purpose of all files inside the directory is to setup an application no need to mention it in the file name

* Revert userguide.md zed

* docs: new repo (#888)

* Removes docs and mentions on readme

* Update README.md

* Update README.md

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>

* Update linutil.yml

* Delete xtask.yml

* Update preview.yml

* Update README.md

---------

Co-authored-by: Chris Titus <contact@christitus.com>
Co-authored-by: Adam Perkowski <adas1per@protonmail.com>

* fix(create-bootable-usb.sh) confirmation prompt (#902)

* fix create-bootable-usb.sh confirmation prompt

* Update core/tabs/utils/create-bootable-usb.sh

Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>

---------

Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>

* fix (ci): preview workflow (#905)

* fix: binary download, invalid action inputs

* Update preview.yml

---------

Co-authored-by: Real-MullaC <callumjanes2007new+github@gmail.com>
Co-authored-by: Chris Titus <contact@christitus.com>
Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
Co-authored-by: Lennart Pieperjohanns <95208734+lennartpj@users.noreply.github.com>
Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>
2025-02-01 22:07:11 -06:00

49 lines
1.6 KiB
Bash

#!/bin/sh -e
. ../../common-script.sh
manualInstall() {
JETBRAINS_TOOLBOX_DIR="/opt/jetbrains-toolbox"
case "$ARCH" in
x86_64) ARCHIVE_URL=$(curl -s "https://data.services.jetbrains.com/products/releases?code=TBA&latest=true&type=release" | jq -r ".TBA[0].downloads.linux.link") ;;
aarch64) ARCHIVE_URL=$(curl -s "https://data.services.jetbrains.com/products/releases?code=TBA&latest=true&type=release" | jq -r ".TBA[0].downloads.linuxARM64.link") ;;
esac
curl -fSL "$ARCHIVE_URL" -o "jetbrains-toolbox.tar.gz"
if [ -d "$JETBRAINS_TOOLBOX_DIR" ]; then
"$ESCALATION_TOOL" rm -rf "$JETBRAINS_TOOLBOX_DIR"
fi
"$ESCALATION_TOOL" mkdir -p "$JETBRAINS_TOOLBOX_DIR"
"$ESCALATION_TOOL" tar -xzf "jetbrains-toolbox.tar.gz" -C "$JETBRAINS_TOOLBOX_DIR" --strip-components=1
"$ESCALATION_TOOL" ln -sf "$JETBRAINS_TOOLBOX_DIR/jetbrains-toolbox" "/usr/bin/jetbrains-toolbox"
}
installJetBrainsToolBox() {
if ! command_exists jetbrains-toolbox; then
printf "%b\n" "${YELLOW}Installing Jetbrains Toolbox...${RC}"
case "$PACKAGER" in
pacman)
"$AUR_HELPER" -S --needed --noconfirm jetbrains-toolbox
;;
dnf)
manualInstall
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y libfuse2
manualInstall
;;
esac
printf "%b\n" "${GREEN}Successfully installed Jetbrains Toolbox.${RC}"
else
printf "%b\n" "${GREEN}Jetbrains toolbox is already installed.${RC}"
fi
}
checkEnv
checkEscalationTool
checkAURHelper
installJetBrainsToolBox