mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2026-11-10 10:41:00 +00:00
Fixed versionLessThan comparison for snapshots
This commit is contained in:
1 parent
9842a52820
commit
9ff94f9bd5
1 file changed
+4
@@ -71,6 +71,10 @@ function versionLessThan {
|
|||||||
local givenParts
|
local givenParts
|
||||||
IFS=. read -ra givenParts <<< "$1"
|
IFS=. read -ra givenParts <<< "$1"
|
||||||
|
|
||||||
|
if (( ${#activeParts[@]} < 2 )); then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
if (( activeParts[0] < givenParts[0] )) || \
|
if (( activeParts[0] < givenParts[0] )) || \
|
||||||
(( activeParts[0] == givenParts[0] && activeParts[1] < givenParts[1] )); then
|
(( activeParts[0] == givenParts[0] && activeParts[1] < givenParts[1] )); then
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
Reference in new issue
Block a user