From 517a443636daa1e8085cb4e5325524a54e8a8fd7 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 17 Oct 2023 11:30:23 +0200 Subject: Merging upstream version 1.43.0. Signed-off-by: Daniel Baumann --- packaging/installer/install-required-packages.sh | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'packaging/installer/install-required-packages.sh') diff --git a/packaging/installer/install-required-packages.sh b/packaging/installer/install-required-packages.sh index 9eba38457..807c30552 100755 --- a/packaging/installer/install-required-packages.sh +++ b/packaging/installer/install-required-packages.sh @@ -182,7 +182,7 @@ get_os_release() { case "${x,,}" in almalinux | alpine | arch | centos | clear-linux-os | debian | fedora | gentoo | manjaro | opensuse-leap | opensuse-tumbleweed | ol | rhel | rocky | sabayon | sles | suse | ubuntu) distribution="${x}" - if [ "${ID}" = "opensuse-tumbleweed" ]; then + if [[ "${ID}" = "opensuse-tumbleweed" ]]; then version="tumbleweed" codename="tumbleweed" else @@ -197,9 +197,10 @@ get_os_release() { ;; esac done - [ -z "${distribution}" ] && echo >&2 "Cannot find valid distribution in: ${ID} ${ID_LIKE}" && return 1 + [[ -z "${distribution}" ]] && echo >&2 "Cannot find valid distribution in: \ +${ID} ${ID_LIKE}" && return 1 - [ -z "${distribution}" ] && return 1 + [[ -z "${distribution}" ]] && return 1 return 0 } @@ -409,9 +410,9 @@ detect_package_manager_from_distribution() { centos* | clearos* | rocky* | almalinux*) package_installer="" tree="centos" - [ -n "${yum}" ] && package_installer="install_yum" - [ -n "${dnf}" ] && package_installer="install_dnf" - if [ "${IGNORE_INSTALLED}" -eq 0 ] && [ -z "${package_installer}" ]; then + [[ -n "${yum}" ]] && package_installer="install_yum" + [[ -n "${dnf}" ]] && package_installer="install_dnf" + if [[ "${IGNORE_INSTALLED}" -eq 0 ]] && [[ -z "${package_installer}" ]]; then echo >&2 "command 'yum' or 'dnf' is required to install packages on a '${distribution} ${version}' system." exit 1 fi @@ -420,9 +421,9 @@ detect_package_manager_from_distribution() { fedora* | redhat* | red\ hat* | rhel*) package_installer= tree="rhel" - [ -n "${yum}" ] && package_installer="install_yum" - [ -n "${dnf}" ] && package_installer="install_dnf" - if [ "${IGNORE_INSTALLED}" -eq 0 ] && [ -z "${package_installer}" ]; then + [[ -n "${yum}" ]] && package_installer="install_yum" + [[ -n "${dnf}" ]] && package_installer="install_dnf" + if [[ "${IGNORE_INSTALLED}" -eq 0 ]] && [[ -z "${package_installer}" ]]; then echo >&2 "command 'yum' or 'dnf' is required to install packages on a '${distribution} ${version}' system." exit 1 fi @@ -612,6 +613,8 @@ declare -A pkg_find=( ['gentoo']="sys-apps/findutils" ['fedora']="findutils" ['clearlinux']="findutils" + ['rhel']="findutils" + ['centos']="findutils" ['macos']="NOTREQUIRED" ['freebsd']="NOTREQUIRED" ['default']="WARNING|" -- cgit v1.2.3