Compare commits
7 commits
2e6f7309f9
...
37008fdb44
Author | SHA1 | Date | |
---|---|---|---|
37008fdb44 | |||
9f852c1ad4 | |||
8bfc09c0d8 | |||
a72c566da8 | |||
630b677269 | |||
6d305b2b80 | |||
c6b63cf94b |
1 changed files with 7 additions and 2 deletions
9
yadm
9
yadm
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue