This commit is contained in:
Dmitry Maksyoma
2023-01-24 22:15:03 +13:00
parent 956f83dda2
commit 503784a4aa
2 changed files with 15 additions and 31 deletions

View File

@@ -12,4 +12,17 @@ detect_distro() {
fi
}
install_packages() {
local install_cmd=no-command-defined
case "$DISTRO" in
centos) install_cmd="yum install -y" ;;
oracle) install_cmd="dnf install -y" ;;
opensuse) install_cmd="zypper install -y" ;;
*) install_cmd="apt-get update && apt-get install -y"
esac
eval "$install_cmd $*"
}
detect_distro