Switch Slack to Flathub instead of the packagecloud apt repo

Adds a shared ensure_flatpak helper in lib.sh (installs flatpak + adds the
Flathub remote) and reuses it from both the slack module and desnap.sh's
unmapped-snap fallback instead of duplicating the setup.
This commit is contained in:
2026-07-15 17:04:38 +03:00
parent 36f0caa66e
commit 77cc3a1c98
5 changed files with 22 additions and 12 deletions
+8 -5
View File
@@ -1,7 +1,10 @@
install_slack() {
if has_cmd slack; then ok "slack already installed"; return; fi
apt_add_repo slack /etc/apt/trusted.gpg.d/slack.gpg \
https://packagecloud.io/slacktechnologies/slack/gpgkey \
"deb https://packagecloud.io/slacktechnologies/slack/debian/ jessie main"
apt_install slack-desktop
if flatpak list --app 2>/dev/null | grep -q com.slack.Slack; then
ok "slack already installed"
return
fi
ensure_flatpak
sudo flatpak install -y flathub com.slack.Slack
rollback_push "sudo flatpak uninstall -y com.slack.Slack"
}