S14postupgrade: use semver-sort

This commit is contained in:
Calin Crisan 2019-12-27 23:51:50 +02:00
parent 6fe7087e97
commit 6d374f64b7

View File

@ -17,7 +17,7 @@ test "${hash}" == "${sys_hash}" && exit 0
test -d ${POST_UPGRADE_DIR} || exit 0
function version_gt() {
if [[ "$1" != "$2" ]] && [[ $(echo -e "$2\n$1" | sort -t . | head -n 1) == "$2" ]]; then
if [[ "$1" != "$2" ]] && [[ $(echo -e "$2\n$1" | semver-sort | head -n 1) == "$2" ]]; then
return 0
else
return 1