Also, I don't think this test will work. "5.7.1" is not a numeric value, so comparing numerically is not an option. The ">" operator in bash compares string sort orders, but I'm not sure that is sufficient for our purposes. For example:

$ if [ "5.7.1" > "5.7.22" ]; then echo bigger; else echo smaller; fi
bigger