From 24513e8dde1b768c9190c4edf650893240e76bb5 Mon Sep 17 00:00:00 2001 From: Rob Zwissler Date: Wed, 6 Mar 2024 13:50:39 -0800 Subject: [PATCH] format/shellcheck --- sver | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/sver b/sver index f594e06..9e4c0c6 100755 --- a/sver +++ b/sver @@ -140,7 +140,7 @@ sver_constraint() { # $1=version $2=constraint(s); if matches returns 0 else 1 version=$REPLY shift constraints="$*" - while [ -n "$constraints" ] && [ $return_status = 0 ] ; do + while [ -n "$constraints" ] && [ $return_status = 0 ]; do constraint=${constraints%%,*} constraints=${constraints#*,} if [ "$constraint" = "$constraints" ]; then @@ -154,14 +154,14 @@ sver_constraint() { # $1=version $2=constraint(s); if matches returns 0 else 1 return_status=1 fi elif [ "$operator" = '!' ]; then - if [ "${value_alpha/pre*/pre}" = 'pre' ] ; then + if [ "${value_alpha/pre*/pre}" = 'pre' ]; then sver_get_prerelease "$version" - if [ -n "$REPLY" ] ; then + if [ -n "$REPLY" ]; then return_status=1 fi - elif [ "${value_alpha/build*/build}" = 'build' ] ; then + elif [ "${value_alpha/build*/build}" = 'build' ]; then sver_get_build_metadata "$version" - if [ -n "$REPLY" ] ; then + if [ -n "$REPLY" ]; then return_status=1 fi fi @@ -402,7 +402,7 @@ sver_greater_than() { # if $1 > $2 then return 0 else return 1 } sver_help() { - # shellcheck disable=SC1079 + # shellcheck disable=SC1078 echo "${SVER_INTRO} Usage: sver [] [|