Commit 1df492fe authored by hrchilds's avatar hrchilds

Add support for two digit release names, like 1.10


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@4774 18c085ea-50e0-402c-830e-de6fd14e8384
parent fd3528d7
......@@ -11,6 +11,9 @@
# Hank Childs, Wed Jan 9 08:44:30 PST 2008
# Fix typo, add svn_mv_dir.
#
# Hank Childs, Thu Aug 7 08:41:15 PDT 2008
# Add support for two digit minor releases, such as 1.10 or 1.10.1.
#
# *****************************************************************************
......@@ -73,9 +76,15 @@ function is_version_string
if [[ ${#1} == 3 ]] ; then
is_two_digit_version_string $1
return $?
elif [[ ${#1} == 4 ]] ; then
is_two_digit_version_string $1
return $?
elif [[ ${#1} == 5 ]] ; then
is_three_digit_version_string $1
return $?
elif [[ ${#1} == 6 ]] ; then
is_three_digit_version_string $1
return $?
fi
return 0
......@@ -84,7 +93,9 @@ function is_version_string
function is_two_digit_version_string
{
if [[ ${#1} != 3 ]] ; then
return 0
if [[ ${#1} != 4 ]] ; then
return 0
fi
fi
typeset X
......@@ -105,6 +116,14 @@ function is_two_digit_version_string
return 0
fi
if [[ ${#1} == 4 ]] ; then
typeset -L4 X=$1
typeset -R1 X
if [[ "$X" != [0-9] ]] ; then
return 0
fi
fi
return 1
}
......@@ -134,14 +153,26 @@ function is_three_digit_version_string
typeset -L4 X=$1
typeset -R1 X
if [[ "$X" != "." ]] ; then
return 0
fi
typeset -L5 X=$1
typeset -R1 X
if [[ "$X" != [0-9] ]] ; then
return 0
if [[ "$X" == "." ]] ; then
typeset -L5 X=$1
typeset -R1 X
if [[ "$X" != [0-9] ]] ; then
return 0
fi
elif [[ "$X" != "." ]] ; then
if [[ "$X" != [0-9] ]] ; then
return 0
fi
typeset -L5 X=$1
typeset -R1 X
if [[ "$X" != "." ]] ; then
return 0
fi
typeset -L6 X=$1
typeset -R1 X
if [[ "$X" != [0-9] ]] ; then
return 0
fi
fi
return 1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment