better case statement
This commit is contained in:
parent
6ff8902e21
commit
da5c722f7f
1 changed files with 7 additions and 12 deletions
19
01-utils.sh
19
01-utils.sh
|
@ -48,17 +48,13 @@ set_version() {
|
||||||
done
|
done
|
||||||
|
|
||||||
case "$ID" in
|
case "$ID" in
|
||||||
debian) ID="$ID" ;;
|
centos) [ -n "$VERSION_ID" ] && [ "$VERSION_ID" -eq 9 ] &&
|
||||||
ubuntu) ID="debian" ;;
|
ID="fedora" ;;
|
||||||
fedora) ID="$ID" ;;
|
*suse*|sles|sled) ID="suse" ;;
|
||||||
rhel) ID="fedora" ;;
|
debian|ubuntu) ID="debian" ;;
|
||||||
centos) [ "$VERSION_ID" -eq 9 ] && ID="fedora" ;;
|
fedora|rhel) ID="fedora" ;;
|
||||||
*suse*) ID="suse" ;;
|
arch|manjaro) ID="arch" ;;
|
||||||
sles) ID="suse" ;;
|
*) ID="${ID_LIKE%% *}" ;;
|
||||||
sled) ID="suse" ;;
|
|
||||||
arch) ID="$ID" ;;
|
|
||||||
manjaro) ID="arch" ;;
|
|
||||||
*) ID="${ID_LIKE%% *}" ;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
[ "$ID" = "ubuntu" ] && ID="debian"
|
[ "$ID" = "ubuntu" ] && ID="debian"
|
||||||
|
@ -99,4 +95,3 @@ if [ -z "$MENU" ] ; then
|
||||||
command -v kdialog > /dev/null && MENU="kdialog" && return 0
|
command -v kdialog > /dev/null && MENU="kdialog" && return 0
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue