1
0
Fork 0
mirror of synced 2024-09-07 12:06:23 -04:00

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 <stigpro@outlook.fr>
This commit is contained in:
Nicolas signed-log FORMICHELLA 2022-08-28 18:24:51 +02:00
parent 36fda72bec
commit 8f390cf085
No known key found for this signature in database
GPG key ID: 273140E170D76BA6

4
yadm
View file

@ -204,14 +204,14 @@ function score_file() {
return return
fi fi
elif [[ "$label" =~ ^(d|distro)$ ]]; then elif [[ "$label" =~ ^(d|distro)$ ]]; then
if [ "$value" = "$local_distro" ]; then if [ "${value/\ /_}" = "${local_distro/\ /_}" ]; then
score=$((score + 4)) score=$((score + 4))
else else
score=0 score=0
return return
fi fi
elif [[ "$label" =~ ^(f|distro_family)$ ]]; then elif [[ "$label" =~ ^(f|distro_family)$ ]]; then
if [ "$value" = "$local_distro_family" ]; then if [ "${value/\ /_}" = "${local_distro_family/\ /_}" ]; then
score=$((score + 8)) score=$((score + 8))
else else
score=0 score=0