2024-09-22 18:58:52 +01:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
|
|
|
. ../../common-script.sh
|
|
|
|
|
|
|
|
installSignal() {
|
2024-10-31 20:21:01 +00:00
|
|
|
if ! command_exists org.signal.Signal && ! command_exists signal; then
|
2024-09-22 18:58:52 +01:00
|
|
|
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
|
2024-09-22 23:21:05 +01:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" update
|
2024-09-22 18:58:52 +01:00
|
|
|
"$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)
|
2024-10-31 20:21:01 +00:00
|
|
|
checkFlatpak
|
|
|
|
flatpak install -y flathub org.signal.Signal
|
2024-09-22 18:58:52 +01:00
|
|
|
;;
|
2024-11-07 19:03:21 +00:00
|
|
|
apk)
|
|
|
|
checkFlatpak
|
|
|
|
flatpak install -y flathub org.signal.Signal
|
|
|
|
;;
|
2024-09-22 18:58:52 +01:00
|
|
|
*)
|
|
|
|
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
|