From 46fd0e87fc3ae5317677133f8a1e14a304b9e44a Mon Sep 17 00:00:00 2001 From: Albert de Palo Hardvendel <71041549+Albert-LGTM@users.noreply.github.com> Date: Thu, 10 Oct 2024 15:55:50 +0200 Subject: [PATCH] Update core/tabs/applications-setup/podman-setup.sh Co-authored-by: nyx --- core/tabs/applications-setup/podman-setup.sh | 44 +++++++++----------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/core/tabs/applications-setup/podman-setup.sh b/core/tabs/applications-setup/podman-setup.sh index 6cc4ea78..485cd09e 100644 --- a/core/tabs/applications-setup/podman-setup.sh +++ b/core/tabs/applications-setup/podman-setup.sh @@ -2,31 +2,27 @@ . ../common-script.sh -install_podman() { - printf "%b\n" "${YELLOW}Installing Podman...${RC}" - case "$PACKAGER" in - apt-get|nala) - "$ESCALATION_TOOL" "$PACKAGER" install -y podman - ;; - zypper) - "$ESCALATION_TOOL" "$PACKAGER" --non-interactive install podman - ;; - pacman) - "$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm --needed podman - ;; - dnf) - "$ESCALATION_TOOL" "$PACKAGER" install -y podman - ;; - *) - printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" - exit 1 - ;; - esac -} - -install_components() { +installPodman() { if ! command_exists podman; then - install_podman + printf "%b\n" "${YELLOW}Installing Podman...${RC}" + case "$PACKAGER" in + apt-get|nala) + "$ESCALATION_TOOL" "$PACKAGER" install -y podman + ;; + zypper) + "$ESCALATION_TOOL" "$PACKAGER" --non-interactive install podman + ;; + pacman) + "$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm --needed podman + ;; + dnf) + "$ESCALATION_TOOL" "$PACKAGER" install -y podman + ;; + *) + printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" + exit 1 + ;; + esac else printf "%b\n" "${GREEN}Podman is already installed.${RC}" fi