mirror of
https://github.com/TheLocehiliosan/yadm
synced 2024-10-27 20:34:27 +00:00
Merge pull request #456 from erenfro/master
This commit is contained in:
commit
fdfff9465b
9
yadm
9
yadm
@ -204,6 +204,7 @@ function score_file() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
elif [[ "$label" =~ ^(d|distro)$ ]]; then
|
elif [[ "$label" =~ ^(d|distro)$ ]]; then
|
||||||
|
value=$("${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$value")
|
||||||
if [ "${value/\ /_}" = "${local_distro/\ /_}" ]; then
|
if [ "${value/\ /_}" = "${local_distro/\ /_}" ]; then
|
||||||
score=$((score + 4))
|
score=$((score + 4))
|
||||||
else
|
else
|
||||||
@ -211,6 +212,7 @@ function score_file() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
elif [[ "$label" =~ ^(f|distro_family)$ ]]; then
|
elif [[ "$label" =~ ^(f|distro_family)$ ]]; then
|
||||||
|
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))
|
||||||
else
|
else
|
||||||
@ -1522,7 +1524,7 @@ function query_distro() {
|
|||||||
fi
|
fi
|
||||||
done < "$OS_RELEASE"
|
done < "$OS_RELEASE"
|
||||||
fi
|
fi
|
||||||
echo "$distro"
|
"${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$distro"
|
||||||
}
|
}
|
||||||
|
|
||||||
function query_distro_family() {
|
function query_distro_family() {
|
||||||
@ -1533,10 +1535,13 @@ function query_distro_family() {
|
|||||||
family="${line#ID_LIKE=}"
|
family="${line#ID_LIKE=}"
|
||||||
family="${family//\"}"
|
family="${family//\"}"
|
||||||
break
|
break
|
||||||
|
elif [[ -z "$family" && "$line" = ID=* ]]; then
|
||||||
|
family="${line#ID=}"
|
||||||
|
family="${family//\"}"
|
||||||
fi
|
fi
|
||||||
done < "$OS_RELEASE"
|
done < "$OS_RELEASE"
|
||||||
fi
|
fi
|
||||||
echo "$family"
|
"${AWK_PROGRAM[0]}" '{print tolower($0)}' <<<"$distro"
|
||||||
}
|
}
|
||||||
|
|
||||||
function process_global_args() {
|
function process_global_args() {
|
||||||
|
Loading…
Reference in New Issue
Block a user