From 7609d755a7d58b0009185739435c0c10e0fa0dab Mon Sep 17 00:00:00 2001 From: cpunerd Date: Mon, 5 Aug 2024 15:03:42 -0500 Subject: [PATCH 1/2] add option to remove snaps --- src/commands/system-setup/4-remove-snaps.sh | 28 +++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/commands/system-setup/4-remove-snaps.sh diff --git a/src/commands/system-setup/4-remove-snaps.sh b/src/commands/system-setup/4-remove-snaps.sh new file mode 100644 index 00000000..c839e4f0 --- /dev/null +++ b/src/commands/system-setup/4-remove-snaps.sh @@ -0,0 +1,28 @@ +#!/bin/sh -e + +. ./common-script.sh + +removeSnaps() { + case $PACKAGER in + pacman) + sudo ${PACKAGER} -Rns snapd + ;; + apt-get|nala) + sudo ${PACKAGER} autoremove --purge snapd + if [ "$ID" = ubuntu ]; then + sudo apt-mark hold snapd + fi + ;; + dnf) + sudo ${PACKAGER} remove snapd + ;; + zypper) + sudo ${PACKAGER} remove snapd + ;; + *) + echo "removing snapd not implemented for this package manager" + esac +} + +checkEnv +removeSnaps From 8b9352a12ce4fddded9701e6f1d72811472b3945 Mon Sep 17 00:00:00 2001 From: cpunerd Date: Mon, 5 Aug 2024 15:09:57 -0500 Subject: [PATCH 2/2] Remove snaps --- src/list.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/list.rs b/src/list.rs index 4bf11d55..d1a4a98f 100644 --- a/src/list.rs +++ b/src/list.rs @@ -74,6 +74,10 @@ impl CustomList { name: "Global Theme", command: Command::LocalFile("system-setup/3-global-theme.sh"), }, + ListNode { + name: "Remove Snaps", + command: Command::LocalFile("system-setup/4-remove-snaps.sh"), + }, }, ListNode { name: "Security",