This repository has been archived on 2025-09-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
repertory-ui/public/detect_linux.sh
2019-04-11 12:45:46 -05:00

24 lines
544 B
Bash

#!/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" = "linuxmint" ]; then
if [ "$DISTVER" = "19" ] || [ "$DISTVER" = "19.1" ]; then
DISTNAME=ubuntu
DISTVER=18.04
fi
fi
elif [ -f /etc/debian_version ]; then
DISTNAME=debian
DISTVER=$(head -1 /etc/debian_version|awk -F. '{print $1}')
fi
echo ${DISTNAME}${DISTVER}