An answer forFor most modern linux-OSLinux OS systems., the file /etc/os-release is really becoming standard and is getting included in most OS. soSo inside your bashBash script youryou can just include the file, and you will have access to all variables described here (egfor example: NAME, VERSION, ...)
soSo I'm just using this in my bashBash script:
if [ -f /etc/os-release ]
then
. /etc/os-release
else
echo "ERROR: I need the file /etc/os-release to determine what my distribution is..."
# ifIf you want, you can include older or distribution specific files here...
exit
fi