mirror of
https://github.com/minio/minio.git
synced 2025-03-02 23:09:13 -05:00
Add a generic version checker function
This commit is contained in:
parent
e0b9a2f9ef
commit
2ef1df016b
@ -1,5 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
check_version() {
|
||||
local version=$1 check=$2
|
||||
local highest=$(echo -e "$version\n$check" | sort -nrt. -k1,1 -k2,2 -k3,3 | head -1)
|
||||
[[ "$highest" = "$version" ]] && return 0
|
||||
return 1
|
||||
}
|
||||
|
||||
echo -n "Checking if proper environment variables are set.. "
|
||||
|
||||
echo ${GOROOT:?} 2>&1 >/dev/null
|
||||
|
Loading…
x
Reference in New Issue
Block a user