Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update check-minimum-requirements.sh #3292

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions install/check-minimum-requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ source install/_min-requirements.sh

# Check the version of $1 is greater than or equal to $2 using sort. Note: versions must be stripped of "v"
function vergte() {
printf "%s\n%s" $1 $2 | sort --version-sort --check=quiet --reverse
echo $?
if [[ "$(printf "%s\n%s" "$1" "$2" | sort --version-sort | head -n 1)" == "$2" ]]; then
return 0 # $1 is greater than or equal to $2
else
return 1 # $1 is less than $2
fi
}

DOCKER_VERSION=$(docker version --format '{{.Server.Version}}' || echo '')
Expand Down