Skip to content

Commit

Permalink
Accept _ as space substitutes
Browse files Browse the repository at this point in the history
Replace all spaces in the ID/ID_LIKE scoring to allow for space
replacement

Signed-off-by: Nicolas signed-log FORMICHELLA <[email protected]>
  • Loading branch information
signed-log committed Aug 28, 2022
1 parent 36fda72 commit 8f390cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yadm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8f390cf

Please sign in to comment.