From 1c770cbbb369ab4099963d453ba8712eb9a74e33 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Mon, 22 Dec 2025 03:18:26 -0800 Subject: prefer match before dot `3.1' will now match `python-3.1.5' over `python-3.12.0'. --- gbpm.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gbpm.sh') diff --git a/gbpm.sh b/gbpm.sh index ac46c33..e96ce69 100755 --- a/gbpm.sh +++ b/gbpm.sh @@ -124,15 +124,16 @@ cmd_set() { prefix="${bn%%${1}*}" pri="${prefix//[^-]}" - pri="$((${#pri} * 4))" + pri="$((${#pri} * 5))" if [[ "${prefix}" == @(|*-) ]]; then case "${bn#*${1}}" in '') ;; -*) ((pri++)) ;; - *) ((pri += 2)) ;; + .*) ((pri += 2)) ;; + *) ((pri += 3)) ;; esac else - ((pri += 3)) + ((pri += 4)) fi [[ "${pri}" -le "${match_pri:-${pri}}" ]] || continue -- cgit v1.2.3-70-g09d2