From 6377d84cc518fc93302b4ba8002c7842445f5ded Mon Sep 17 00:00:00 2001 From: JohnnyRevay <65253638+jan-revay@users.noreply.github.com> Date: Sun, 22 Oct 2023 18:18:30 +0200 Subject: [PATCH] prelude.sh - fix shellcheck warnings --- prelude.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/prelude.sh b/prelude.sh index 562c456f9..d68e75320 100644 --- a/prelude.sh +++ b/prelude.sh @@ -99,7 +99,12 @@ if [[ "${__INITPC_PRELUDE_SOURCED__}" != "true" ]]; then # @param $1 - minimal distro major version function distro_version_ge { - local MAJOR_VERSION="$(get_major_distro_version)" + local MAJOR_VERSION + MAJOR_VERSION="$(get_major_distro_version)" + + if [[ "$?" != '0' ]]; then + exit ${EXIT_INCORRECT_PLATFORM} + fi # An empty VERSION_ID is interpretted as the (positive) infinity. if [[ "${MAJOR_VERSION}" == "" ]]; then @@ -114,7 +119,12 @@ if [[ "${__INITPC_PRELUDE_SOURCED__}" != "true" ]]; then } function distro_version_le { - local MAJOR_VERSION="$(get_major_distro_version)" + local MAJOR_VERSION + MAJOR_VERSION="$(get_major_distro_version)" + + if [[ "$?" != '0' ]]; then + exit ${EXIT_INCORRECT_PLATFORM} + fi # An empty VERSION_ID is interpretted as the (positive) infinity. if [[ "${MAJOR_VERSION}" == "" ]]; then