Skip to content

Commit

Permalink
prelude.sh - fix shellcheck warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-revay authored Oct 22, 2023
1 parent 63c32bd commit 6377d84
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions prelude.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 6377d84

Please sign in to comment.