From 7662f1c433a926697deec451f54ea3061ac0156e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Mon, 19 Sep 2022 07:49:42 +0700 Subject: [PATCH] lint-version: fix check-reverts --- common/scripts/lint-version-change | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/common/scripts/lint-version-change b/common/scripts/lint-version-change index 22a70dc660b..facba3957c4 100755 --- a/common/scripts/lint-version-change +++ b/common/scripts/lint-version-change @@ -46,7 +46,7 @@ show_template_var() { ( show_template "$rev" printf '%s\n' "printf '%s\\n' \"\$${var}\"" - ) | bash + ) | bash 2>/dev/null } revision_reset() { @@ -75,14 +75,10 @@ reverts_on_downgrade() { check_revert() { for vr in $reverts; do - xbps-uhelper cmpver "${vr%_*}" "${version}" + xbps-uhelper cmpver "${version}" "${vr%_*}" case "$?" in - 0) - scan '^version=' 'in $reverts' - status=1 - ;; - 1) - scan '^version=' 'remove from $reverts' + 0 | 1) + scan '^version=' "remove $vr from \$reverts" status=1 ;; esac