linutil/core/tabs/system-setup/remove-snaps.sh
Nyx cca2660c3b
fix every issue related to printf (#596)
* increase synergy between scripts

* Fix newlines Fix packagers etc

* fix an issue with no new line being created

* fix formatting

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

* fix extra comma

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

* change to ()

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

* change to ()

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

* change to ()

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

* change to ()

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

* remove extra comma

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

* remove "please"

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

* add support for caps

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

* add support for caps

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

* add support for caps

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

* remove \n and make the default option "N"

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

* add an extra quote

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

* add extra quotes

* fix remaining sn

* fix remaining new lines

---------

Co-authored-by: nnyyxxxx <nnyyxxxx@users.noreply.github.com>
Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
2024-09-22 11:01:10 -05:00

32 lines
728 B
Bash

#!/bin/sh -e
. ../common-script.sh
removeSnaps() {
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -Rns snapd
;;
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" autoremove --purge snapd
if [ "$ID" = ubuntu ]; then
"$ESCALATION_TOOL" apt-mark hold snapd
fi
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" remove snapd
;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" remove snapd
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
}
checkEnv
checkEscalationTool
removeSnaps