better case statement

This commit is contained in:
tavo 2024-05-16 15:57:36 -06:00
parent 6ff8902e21
commit da5c722f7f

View file

@ -48,17 +48,13 @@ set_version() {
done
case "$ID" in
debian) ID="$ID" ;;
ubuntu) ID="debian" ;;
fedora) ID="$ID" ;;
rhel) ID="fedora" ;;
centos) [ "$VERSION_ID" -eq 9 ] && ID="fedora" ;;
*suse*) ID="suse" ;;
sles) ID="suse" ;;
sled) ID="suse" ;;
arch) ID="$ID" ;;
manjaro) ID="arch" ;;
*) ID="${ID_LIKE%% *}" ;;
centos) [ -n "$VERSION_ID" ] && [ "$VERSION_ID" -eq 9 ] &&
ID="fedora" ;;
*suse*|sles|sled) ID="suse" ;;
debian|ubuntu) ID="debian" ;;
fedora|rhel) ID="fedora" ;;
arch|manjaro) ID="arch" ;;
*) ID="${ID_LIKE%% *}" ;;
esac
[ "$ID" = "ubuntu" ] && ID="debian"
@ -99,4 +95,3 @@ if [ -z "$MENU" ] ; then
command -v kdialog > /dev/null && MENU="kdialog" && return 0
fi
}