mirror of
https://github.com/LukeZGD/Legacy-iOS-Kit.git
synced 2025-02-02 10:12:41 +01:00
Fix Ubuntu version detecting (fix #296)
This commit is contained in:
parent
3134fe5da6
commit
d53e674247
12
restore.sh
12
restore.sh
@ -115,7 +115,17 @@ set_tool_paths() {
|
||||
|
||||
# version check
|
||||
if [[ -n $UBUNTU_CODENAME ]]; then
|
||||
ubuntu_ver="$(echo "$VERSION_ID" | cut -c -2)"
|
||||
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)"
|
||||
fi
|
||||
elif [[ -e /etc/debian_version ]]; then
|
||||
debian_ver=$(cat /etc/debian_version)
|
||||
if [[ $debian_ver == *"sid" ]]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user