mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-25 14:30:11 +00:00
9611dd3786
Co-authored-by: nyx <nnyyxxxx@protonmail.com>
34 lines
980 B
Bash
34 lines
980 B
Bash
#!/bin/sh -e
|
|
|
|
. ../common-script.sh
|
|
|
|
installPodmanCompose() {
|
|
if ! command_exists podman-compose; then
|
|
printf "%b\n" "${YELLOW}Installing Podman Compose...${RC}"
|
|
case "$PACKAGER" in
|
|
apt-get|nala)
|
|
"$ESCALATION_TOOL" "$PACKAGER" install -y podman-compose
|
|
;;
|
|
zypper)
|
|
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install podman-compose
|
|
;;
|
|
pacman)
|
|
"$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm --needed podman-compose
|
|
;;
|
|
dnf)
|
|
"$ESCALATION_TOOL" "$PACKAGER" install -y podman-compose
|
|
;;
|
|
*)
|
|
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
else
|
|
printf "%b\n" "${GREEN}Podman Compose is already installed.${RC}"
|
|
fi
|
|
}
|
|
|
|
checkEnv
|
|
checkEscalationTool
|
|
installPodmanCompose
|