lint-version: fix check-reverts

This commit is contained in:
Đoàn Trần Công Danh 2022-09-19 07:49:42 +07:00
parent 57f3cde5c7
commit 7662f1c433
1 changed files with 4 additions and 8 deletions

View File

@ -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