Skip to content

Commit

Permalink
Fixed issue TheLocehiliosan#455-lowercasing checks on both sides
Browse files Browse the repository at this point in the history
  • Loading branch information
erenfro committed May 30, 2023
1 parent e4bb8a7 commit c6b63cf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions yadm
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,15 @@ function score_file() {
return
fi
elif [[ "$label" =~ ^(d|distro)$ ]]; then
value=${value,,}
if [ "${value/\ /_}" = "${local_distro/\ /_}" ]; then
score=$((score + 4))
else
score=0
return
fi
elif [[ "$label" =~ ^(f|distro_family)$ ]]; then
value=${value,,}
if [ "${value/\ /_}" = "${local_distro_family/\ /_}" ]; then
score=$((score + 8))
else
Expand Down Expand Up @@ -1522,7 +1524,7 @@ function query_distro() {
fi
done < "$OS_RELEASE"
fi
echo "$distro"
echo "${distro,,}"
}

function query_distro_family() {
Expand All @@ -1536,7 +1538,7 @@ function query_distro_family() {
fi
done < "$OS_RELEASE"
fi
echo "$family"
echo "${family,,}"
}

function process_global_args() {
Expand Down

0 comments on commit c6b63cf

Please sign in to comment.