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

43 lines
2.2 KiB
Bash

#!/bin/sh -e
. ../../common-script.sh
installGithubDesktop() {
if ! command_exists github-desktop; then
printf "%b\n" "${YELLOW}Installing Github Desktop...${RC}"
case "$PACKAGER" in
apt-get|nala)
curl -fsSL https://apt.packages.shiftkey.dev/gpg.key | gpg --dearmor | "$ESCALATION_TOOL" tee /usr/share/keyrings/shiftkey-packages.gpg > /dev/null
printf "%b\n" 'deb [arch=amd64 signed-by=/usr/share/keyrings/shiftkey-packages.gpg] https://apt.packages.shiftkey.dev/ubuntu/ any main\n' | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/shiftkey-packages.list > /dev/null
"$ESCALATION_TOOL" "$PACKAGER" update
"$ESCALATION_TOOL" "$PACKAGER" install -y github-desktop
;;
zypper)
"$ESCALATION_TOOL" rpm --import https://rpm.packages.shiftkey.dev/gpg.key
printf "%b\n" '[shiftkey-packages]\nname=GitHub Desktop\nbaseurl=https://rpm.packages.shiftkey.dev/rpm/\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://rpm.packages.shiftkey.dev/gpg.key\n' | "$ESCALATION_TOOL" tee /etc/zypp/repos.d/shiftkey-packages.repo > /dev/null
"$ESCALATION_TOOL" "$PACKAGER" refresh
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install github-desktop
;;
pacman)
"$AUR_HELPER" -S --needed --noconfirm github-desktop-bin
;;
dnf)
"$ESCALATION_TOOL" rpm --import https://rpm.packages.shiftkey.dev/gpg.key
printf "%b\n" '[shiftkey-packages]\nname=GitHub Desktop\nbaseurl=https://rpm.packages.shiftkey.dev/rpm/\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://rpm.packages.shiftkey.dev/gpg.key\n' | "$ESCALATION_TOOL" tee /etc/yum.repos.d/shiftkey-packages.repo > /dev/null
"$ESCALATION_TOOL" "$PACKAGER" install -y github-desktop
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
printf "%b\n" "${GREEN}Github Desktop is already installed.${RC}"
fi
}
checkEnv
checkEscalationTool
checkAURHelper
installGithubDesktop