linutil/core/tabs/applications-setup/communication-apps/signal-setup.sh
JEEVITHA KANNAN K S 53cbb4b733
refact, fix: Package managers (#629)
* Fix package managers

* Update core/tabs/applications-setup/Developer-tools/githubdesktop-setup.sh

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

* Update core/tabs/applications-setup/Developer-tools/vscodium-setup.sh

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

* Update core/tabs/applications-setup/Developer-tools/sublime-setup.sh

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

* Update core/tabs/applications-setup/Developer-tools/vscode-setup.sh

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

* Update core/tabs/applications-setup/browser-setup.sh

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

---------

Co-authored-by: Chris Titus <contact@christitus.com>
Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
2024-09-22 17:21:05 -05:00

38 lines
1.5 KiB
Bash

#!/bin/sh -e
. ../../common-script.sh
installSignal() {
if ! command_exists signal; then
printf "%b\n" "${YELLOW}Installing Signal...${RC}"
case "$PACKAGER" in
apt-get|nala)
curl -fsSL https://updates.signal.org/desktop/apt/keys.asc | gpg --dearmor > signal-desktop-keyring.gpg
cat signal-desktop-keyring.gpg | "$ESCALATION_TOOL" tee /usr/share/keyrings/signal-desktop-keyring.gpg > /dev/null
printf "%b\n" 'deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main' | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/signal-xenial.list
"$ESCALATION_TOOL" "$PACKAGER" update
"$ESCALATION_TOOL" "$PACKAGER" -y install signal-desktop
;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install signal-desktop
;;
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm signal-desktop
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" copr enable luminoso/Signal-Desktop
"$ESCALATION_TOOL" "$PACKAGER" install -y signal-desktop
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
printf "%b\n" "${GREEN}Signal is already installed.${RC}"
fi
}
checkEnv
checkEscalationTool
installSignal