From 8f390cf085938e5230774ef68a3f60a8ccdf9a82 Mon Sep 17 00:00:00 2001 From: Nicolas signed-log FORMICHELLA Date: Sun, 28 Aug 2022 18:24:51 +0200 Subject: [PATCH] Accept _ as space substitutes Replace all spaces in the ID/ID_LIKE scoring to allow for space replacement Signed-off-by: Nicolas signed-log FORMICHELLA --- yadm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yadm b/yadm index 97a56c1..a9330b0 100755 --- a/yadm +++ b/yadm @@ -204,14 +204,14 @@ function score_file() { return fi elif [[ "$label" =~ ^(d|distro)$ ]]; then - if [ "$value" = "$local_distro" ]; then + if [ "${value/\ /_}" = "${local_distro/\ /_}" ]; then score=$((score + 4)) else score=0 return fi elif [[ "$label" =~ ^(f|distro_family)$ ]]; then - if [ "$value" = "$local_distro_family" ]; then + if [ "${value/\ /_}" = "${local_distro_family/\ /_}" ]; then score=$((score + 8)) else score=0