From 8404e1d3bada9927af7ee5dddcf4c3069933bfe9 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 28 Aug 2021 09:47:18 -0300 Subject: aux/workflow/dist.sh: Use -c flag from sort for simpler if expression --- aux/workflow/dist.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'aux/workflow') diff --git a/aux/workflow/dist.sh b/aux/workflow/dist.sh index 1156474..a433478 100755 --- a/aux/workflow/dist.sh +++ b/aux/workflow/dist.sh @@ -53,8 +53,7 @@ if git show "$VVERSION" 1>/dev/null 2>/dev/null; then exit 1 fi -TAG_LIST="$(printf '%s\n%s\n' "$(git tag)" "$VVERSION")" -if [ "$TAG_LIST" != "$(echo "$TAG_LIST" | sort -t. -n -k1 -k2 -k3)" ]; then +if ! printf '%s\n%s\n' "$(git tag)" "$VVERSION" | sort -nct. -k1 -k2 -k3; then echo 'New tag is not bigger than existing ones.' >&2 exit 1 fi -- cgit v1.2.3