diff --git a/.bashrc b/.bashrc index cec3a70..377d4cc 100644 --- a/.bashrc +++ b/.bashrc @@ -366,7 +366,31 @@ distribution () dtype="slackware" ;; *) - # If ID is not recognized, keep dtype as unknown + # Check ID_LIKE only if dtype is still unknown + if [ -n "$ID_LIKE" ]; then + case $ID_LIKE in + *fedora*|*rhel*|*centos*) + dtype="redhat" + ;; + *sles*|*opensuse*) + dtype="suse" + ;; + *ubuntu*|*debian*) + dtype="debian" + ;; + *gentoo*) + dtype="gentoo" + ;; + *arch*) + dtype="arch" + ;; + *slackware*) + dtype="slackware" + ;; + esac + fi + + # If ID or ID_LIKE is not recognized, keep dtype as unknown ;; esac fi