linutil/core/tabs/applications-setup/developer-tools/githubdesktop.sh

43 lines
2.2 KiB
Bash
Raw Normal View History

2024-09-21 15:26:32 +01:00
#!/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
2024-09-21 15:26:32 +01:00
;;
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
2024-09-21 15:26:32 +01:00
;;
pacman)
added communication apps to application setup + small fix in dev tools (#618) * added communication apps to application setup * Update core/tabs/applications-setup/communication-apps/thunderbird-setup.sh Co-authored-by: Adam Perkowski <adas1per@protonmail.com> * Update core/tabs/applications-setup/communication-apps/discord-setup.sh Co-authored-by: Adam Perkowski <adas1per@protonmail.com> * Update core/tabs/applications-setup/communication-apps/jitsi-meet-setup.sh Co-authored-by: Adam Perkowski <adas1per@protonmail.com> * Update core/tabs/applications-setup/communication-apps/signal-setup.sh Co-authored-by: Adam Perkowski <adas1per@protonmail.com> * Update core/tabs/applications-setup/communication-apps/telegram-setup.sh Co-authored-by: Adam Perkowski <adas1per@protonmail.com> * Update core/tabs/applications-setup/communication-apps/discord-setup.sh Co-authored-by: Adam Perkowski <adas1per@protonmail.com> * Update core/tabs/applications-setup/communication-apps/jitsi-meet-setup.sh Co-authored-by: Adam Perkowski <adas1per@protonmail.com> * add --needed * fix script name. * added task_list * fix sh -c * Update core/tabs/applications-setup/communication-apps/jitsi-setup.sh Co-authored-by: Nyx <144965845+nnyyxxxx@users.noreply.github.com> * speed up github desktop installation * Update core/tabs/applications-setup/communication-apps/zoom-setup.sh Co-authored-by: Nyx <144965845+nnyyxxxx@users.noreply.github.com> * Update core/tabs/applications-setup/tab_data.toml Co-authored-by: Nyx <144965845+nnyyxxxx@users.noreply.github.com> * Update core/tabs/applications-setup/tab_data.toml Co-authored-by: Adam Perkowski <adas1per@protonmail.com> --------- Co-authored-by: Adam Perkowski <adas1per@protonmail.com> Co-authored-by: Nyx <144965845+nnyyxxxx@users.noreply.github.com>
2024-09-22 18:58:52 +01:00
"$AUR_HELPER" -S --needed --noconfirm github-desktop-bin
2024-09-21 15:26:32 +01:00
;;
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
2024-09-21 15:26:32 +01:00
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
2024-09-21 15:26:32 +01:00
exit 1
;;
esac
else
printf "%b\n" "${GREEN}Github Desktop is already installed.${RC}"
fi
}
checkEnv
checkEscalationTool
checkAURHelper
installGithubDesktop