Skip to content

Commit

Permalink
Rename is:_nat to is_nat. Closes issue #44. (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
ranger6 authored Jan 4, 2021
1 parent 8862212 commit 13370ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/semver
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function validate_version {
fi
}

function is:_nat {
function is_nat {
[[ "$1" =~ ^($NAT)$ ]]
}

Expand Down Expand Up @@ -149,9 +149,9 @@ function compare_fields {
is_null "$left" && { echo -1 ; return ; }
is_null "$right" && { echo 1 ; return ; }

is:_nat "$left" && is:_nat "$right" && { order=$(order_nat "$left" "$right") ; continue ; }
is:_nat "$left" && { echo -1 ; return ; }
is:_nat "$right" && { echo 1 ; return ; }
is_nat "$left" && is_nat "$right" && { order=$(order_nat "$left" "$right") ; continue ; }
is_nat "$left" && { echo -1 ; return ; }
is_nat "$right" && { echo 1 ; return ; }
{ order=$(order_string "$left" "$right") ; continue ; }
done
}
Expand Down

0 comments on commit 13370ad

Please sign in to comment.