diff --git a/install/upgrade_check.sh b/install/upgrade_check.sh index e113f82f..309ba34b 100755 --- a/install/upgrade_check.sh +++ b/install/upgrade_check.sh @@ -28,6 +28,22 @@ if [ -z "$oldvers" -o "$oldvers" = '' ]; then exit 0 fi +#Checking the form of the version variable. it should be x.x.x with x as a digit. +#If it is not we correct it. +if echo $oldvers | grep -qi '[0-9]\.[0-9]\.[0-9].*' ; then + echo upgrading from : $oldvers +else + old_ifs="$IFS" + IFS='~' + read PART1 PART2 <