2024-10-09 12:25:25 +01:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
|
|
|
. ../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)
|
2024-10-10 13:55:03 +01:00
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm --needed podman
|
2024-10-09 12:25:25 +01:00
|
|
|
;;
|
|
|
|
dnf)
|
|
|
|
"$ESCALATION_TOOL" "$PACKAGER" install -y podman
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
install_components() {
|
2024-10-10 14:18:23 +01:00
|
|
|
if ! command_exists podman; then
|
|
|
|
install_podman
|
|
|
|
else
|
|
|
|
printf "%b\n" "${GREEN}Podman is already installed.${RC}"
|
2024-10-09 12:25:25 +01:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
checkEnv
|
|
|
|
checkEscalationTool
|
|
|
|
install_components
|