Correctly detect distro for Ubuntu
This commit is contained in:
parent
4274a52812
commit
5cf85362dc
1 changed files with 3 additions and 2 deletions
|
@ -19,7 +19,7 @@ createRestoreDir() {
|
|||
}
|
||||
|
||||
checkOS() {
|
||||
if [[ "$kernel" == "Darin" ]]; then
|
||||
if [[ "$kernel" == "Darwin" ]]; then
|
||||
return 0
|
||||
elif [[ "$kernel" == "Linux" ]]; then
|
||||
if [[ -f /etc/os-release ]]; then
|
||||
|
@ -27,7 +27,7 @@ checkOS() {
|
|||
DISTRO="$ID"
|
||||
DISTRO_CURRENT="$DISTRO"
|
||||
if [[ -n "$ID_LIKE" ]]; then
|
||||
DISTRO="$ID_LIKE"
|
||||
DISTRO="${ID_LIKE# *}"
|
||||
fi
|
||||
return 0
|
||||
else
|
||||
|
@ -45,6 +45,7 @@ runOsHook() {
|
|||
"${scriptPath}/os_macos" "$hook"
|
||||
elif [[ "$kernel" == "Linux" ]]; then
|
||||
case "$DISTRO" in
|
||||
ubuntu) "${scriptPath}/os_debian" "$hook";;
|
||||
debian) "${scriptPath}/os_debian" "$hook";;
|
||||
fedora) "${scriptPath}/os_fedora" "$hook";;
|
||||
garuda) "${scriptPath}/os_garuda" "$hook";;
|
||||
|
|
Loading…
Reference in a new issue