linutil/core/tabs/applications-setup/developer-tools/sublime.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

48 lines
2.0 KiB
Bash

#!/bin/sh -e
. ../../common-script.sh
installSublime() {
if ! command_exists sublime; then
printf "%b\n" "${YELLOW}Installing Sublime...${RC}"
case "$PACKAGER" in
apt-get|nala)
curl -fsSL https://download.sublimetext.com/sublimehq-pub.gpg | "$ESCALATION_TOOL" apt-key add -
echo "deb https://download.sublimetext.com/ apt/stable/" | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/sublime-text.list
"$ESCALATION_TOOL" "$PACKAGER" update
"$ESCALATION_TOOL" "$PACKAGER" install -y sublime-text
;;
zypper)
"$ESCALATION_TOOL" rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg
"$ESCALATION_TOOL" "$PACKAGER" addrepo -g -f https://download.sublimetext.com/rpm/dev/x86_64/sublime-text.repo
"$ESCALATION_TOOL" "$PACKAGER" refresh
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install sublime-text
;;
pacman)
"$AUR_HELPER" -S --needed --noconfirm sublime-text-4
;;
dnf)
"$ESCALATION_TOOL" rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg
dnf_version=$(dnf --version | head -n 1 | cut -d '.' -f 1)
if [ "$dnf_version" -eq 4 ]; then
"$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://download.sublimetext.com/rpm/dev/x86_64/sublime-text.repo
else
"$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://download.sublimetext.com/rpm/dev/x86_64/sublime-text.repo
fi
"$ESCALATION_TOOL" "$PACKAGER" install -y sublime-text
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
printf "%b\n" "${GREEN}Sublime is already installed.${RC}"
fi
}
checkEnv
checkEscalationTool
installSublime