mirror of
https://gitea.blesmrt.net/mikaela/scripts.git
synced 2025-10-16 18:57:22 +02:00
snap-browsers.bash: actually don't install browsers that are already installed with system package managers
This commit is contained in:
parent
cc88636642
commit
4782f57712
@ -6,7 +6,10 @@
|
|||||||
# respecting browser policies, thus this script which is kind of
|
# respecting browser policies, thus this script which is kind of
|
||||||
# snap-workarounds.bash
|
# snap-workarounds.bash
|
||||||
|
|
||||||
# WARNING: No KDE Desktop Integration for snap users
|
# WARNING: No KDE Desktop Integration for snap users. And obviously this
|
||||||
|
# script isn't going to install snap duplicates of browsers that are already
|
||||||
|
# installed, Ubuntu users are trusted to know firefox/chromium are wrappers
|
||||||
|
# for snaps.
|
||||||
|
|
||||||
# If snap isn't installed, exit
|
# If snap isn't installed, exit
|
||||||
if ! hash snap 2> /dev/null; then
|
if ! hash snap 2> /dev/null; then
|
||||||
@ -39,24 +42,34 @@ fi
|
|||||||
# If Firefox is already installed, switch to the ESR channel for distrust
|
# If Firefox is already installed, switch to the ESR channel for distrust
|
||||||
# towards Mozilla and search engine policy support. Otherwise install Firefox
|
# towards Mozilla and search engine policy support. Otherwise install Firefox
|
||||||
# This is officially supported/published by Mozilla.
|
# This is officially supported/published by Mozilla.
|
||||||
if [ -f "/snap/bin/firefox" ]; then
|
if [[ ! -f "/usr/bin/firefox" ]] && [[ ! -f "/usr/bin/firefox-esr" ]]; then
|
||||||
|
if [ -f "/snap/bin/firefox" ]; then
|
||||||
snap refresh firefox --channel=esr/stable
|
snap refresh firefox --channel=esr/stable
|
||||||
else
|
else
|
||||||
snap install firefox --channel=esr/stable
|
snap install firefox --channel=esr/stable
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "If on Ubuntu: sudo snap refresh firefox --channel=esr/stable"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Difficult to test Chromium policies without Chromium. And for testing edge is fine.
|
# Difficult to test Chromium policies without Chromium. And for testing edge is fine.
|
||||||
# Published/supported by Canonical.
|
# Published/supported by Canonical.
|
||||||
if [ -f "/snap/bin/chromium" ]; then
|
if [[ ! -f "/usr/bin/chromium" ]] && [[ ! -f "/usr/bin/chromium-browser" ]]; then
|
||||||
|
if [ -f "/snap/bin/chromium" ]; then
|
||||||
snap refresh chromium --channel=edge
|
snap refresh chromium --channel=edge
|
||||||
else
|
else
|
||||||
snap install chromium --edge
|
snap install chromium --edge
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "If on Ubuntu: sudo snap refresh chromium --channel=edge"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# European/Norwegian freeware browser that I prefer to keep installed as an option.
|
# European/Norwegian freeware browser that I prefer to keep installed as an option.
|
||||||
# Official snap.
|
# Official snap.
|
||||||
if [ -f "/snap/bin/vivaldi.vivaldi-stable" ]; then
|
if [[ ! -f "/usr/bin/vivaldi" ]] && [[ ! -f "/usr/bin/vivaldi-snapshot" ]]; then
|
||||||
|
if [ -f "/snap/bin/vivaldi.vivaldi-stable" ]; then
|
||||||
snap refresh vivaldi
|
snap refresh vivaldi
|
||||||
else
|
else
|
||||||
snap install vivaldi
|
snap install vivaldi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user