mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2025-02-09 05:13:30 +01:00
Fix Ubuntu version detecting (fix #296)
This commit is contained in:
parent
3134fe5da6
commit
d53e674247
10
restore.sh
10
restore.sh
@ -115,7 +115,17 @@ set_tool_paths() {
|
|||||||
|
|
||||||
# version check
|
# version check
|
||||||
if [[ -n $UBUNTU_CODENAME ]]; then
|
if [[ -n $UBUNTU_CODENAME ]]; then
|
||||||
|
case $UBUNTU_CODENAME in
|
||||||
|
"jammy" | "kinetic" ) ubuntu_ver=22;;
|
||||||
|
"lunar" | "mantic" ) ubuntu_ver=23;;
|
||||||
|
esac
|
||||||
|
if [[ -z $ubuntu_ver ]]; then
|
||||||
|
. /etc/upstream-release/lsb-release 2>/dev/null
|
||||||
|
ubuntu_ver="$(echo "$DISTRIB_RELEASE" | cut -c -2)"
|
||||||
|
fi
|
||||||
|
if [[ -z $ubuntu_ver ]]; then
|
||||||
ubuntu_ver="$(echo "$VERSION_ID" | cut -c -2)"
|
ubuntu_ver="$(echo "$VERSION_ID" | cut -c -2)"
|
||||||
|
fi
|
||||||
elif [[ -e /etc/debian_version ]]; then
|
elif [[ -e /etc/debian_version ]]; then
|
||||||
debian_ver=$(cat /etc/debian_version)
|
debian_ver=$(cat /etc/debian_version)
|
||||||
if [[ $debian_ver == *"sid" ]]; then
|
if [[ $debian_ver == *"sid" ]]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user