#!/bin/bash DISTNAME=unknown DISTVER= if [ -f /etc/solus-release ]; then DISTNAME=solus elif [ -f /etc/lsb-release ]; then . /etc/lsb-release DISTNAME=$(echo ${DISTRIB_ID} | awk '{print tolower($0)}') DISTVER=${DISTRIB_RELEASE} if [ "$DISTNAME" != "ubuntu" ]; then if [ "$DISTNAME" = "linuxmint" ]; then if [ "$DISTVER" = "19" ] || [ "$DISTVER" = "19.1" ]; then DISTNAME=ubuntu DISTVER=18.04 fi elif [ "$DISTNAME" = "elementary" ]; then if [ "$DISTVER" = "5.0" ]; then DISTNAME=ubuntu DISTVER=18.04 fi else DISTNAME=unknown DISTVER= fi fi elif [ -f /etc/debian_version ]; then DISTNAME=debian DISTVER=$(head -1 /etc/debian_version|awk -F. '{print $1}') elif [ -f /etc/os-release ]; then . /etc/os-release if [ "$ID" == "arch" ]; then DISTNAME=arch elif [ "$ID" == "fedora" ]; then if [ "$VERSION_ID" == "29" ]; then DISTNAME=fedora DISTVER=29 fi fi fi echo ${DISTNAME}${DISTVER}