Get rid of the 3xxx.0 if condition

This commit is contained in:
Max Arnold 2020-08-14 15:27:40 +07:00
parent ec112a6f45
commit 1e5a9abd69

View file

@ -609,11 +609,7 @@ elif [ "$ITYPE" = "stable" ]; then
shift
elif [ "$(echo "$1" | grep -E '^(2[0-9]*\.[0-9]*\.[0-9]*|[3-9][0-9]{3}(\.[0-9]*)?)$')" != "" ]; then
# Handle the 3xxx.0 version as 3xxx archive (pin to minor) and strip the fake ".0" suffix
if [ "$(echo "$1" | grep -E '[3-9][0-9]{3}\.0$')" != "" ]; then
STABLE_REV=$(echo "$1" | sed -e 's/\.0$//')
else
STABLE_REV="$1"
fi
STABLE_REV=$(echo "$1" | sed -E 's/^([3-9][0-9]{3})\.0$/\1/')
if [ "$(uname)" != "Darwin" ]; then
STABLE_REV="archive/$STABLE_REV"
fi