1
0
Fork 0
mirror of synced 2024-12-04 06:35:36 -05:00

Fixed issue #455-lowercasing checks on both sides - More POSIX friendly 4

This commit is contained in:
Eric Renfro 2023-05-30 23:17:59 -04:00
parent 8bfc09c0d8
commit 9f852c1ad4
Signed by: psi-jack
GPG key ID: 14977F3A50D9A5BF

4
yadm
View file

@ -204,7 +204,6 @@ function score_file() {
return return
fi fi
elif [[ "$label" =~ ^(d|distro)$ ]]; then elif [[ "$label" =~ ^(d|distro)$ ]]; then
#value=$(echo "$value" | "${AWK_PROGRAM[0]}" '{print tolower($0)}') # FIXME Remove
value=$("${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$value") value=$("${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$value")
if [ "${value/\ /_}" = "${local_distro/\ /_}" ]; then if [ "${value/\ /_}" = "${local_distro/\ /_}" ]; then
score=$((score + 4)) score=$((score + 4))
@ -213,7 +212,6 @@ function score_file() {
return return
fi fi
elif [[ "$label" =~ ^(f|distro_family)$ ]]; then elif [[ "$label" =~ ^(f|distro_family)$ ]]; then
#value=$(echo "$value" | "${AWK_PROGRAM[0]}" '{print tolower($0)}') # FIXME Remove
value=$("${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$value") value=$("${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$value")
if [ "${value/\ /_}" = "${local_distro_family/\ /_}" ]; then if [ "${value/\ /_}" = "${local_distro_family/\ /_}" ]; then
score=$((score + 8)) score=$((score + 8))
@ -1526,7 +1524,6 @@ function query_distro() {
fi fi
done < "$OS_RELEASE" done < "$OS_RELEASE"
fi fi
#echo "$distro" | "${AWK_PROGRAM[0]}" '{print tolower($0)}' ## FIXME Remove
"${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$distro" "${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$distro"
} }
@ -1544,7 +1541,6 @@ function query_distro_family() {
fi fi
done < "$OS_RELEASE" done < "$OS_RELEASE"
fi fi
#echo "$distro" | "${AWK_PROGRAM[0]}" '{print tolower($0)}' ## FIXME Remove
"${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$distro" "${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$distro"
} }