1
0
Fork 0
mirror of synced 2024-12-04 06:35:36 -05:00
This commit is contained in:
Eric Renfro 2024-11-09 23:23:54 +00:00 committed by GitHub
commit 68cc5e3a02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

9
yadm
View file

@ -204,6 +204,7 @@ function score_file() {
return
fi
elif [[ "$label" =~ ^(d|distro)$ ]]; then
value=$("${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$value")
if [ "${value/\ /_}" = "${local_distro/\ /_}" ]; then
score=$((score + 4))
else
@ -211,6 +212,7 @@ function score_file() {
return
fi
elif [[ "$label" =~ ^(f|distro_family)$ ]]; then
value=$("${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$value")
if [ "${value/\ /_}" = "${local_distro_family/\ /_}" ]; then
score=$((score + 8))
else
@ -1548,7 +1550,7 @@ function query_distro() {
fi
done < "$OS_RELEASE"
fi
echo "$distro"
"${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$distro"
}
function query_distro_family() {
@ -1559,10 +1561,13 @@ function query_distro_family() {
family="${line#ID_LIKE=}"
family="${family//\"}"
break
elif [[ -z "$family" && "$line" = ID=* ]]; then
family="${line#ID=}"
family="${family//\"}"
fi
done < "$OS_RELEASE"
fi
echo "$family"
"${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$distro"
}
function process_global_args() {