This commit is contained in:
Steven Foerster
2020-03-08 03:42:34 +00:00
parent 9518cb7257
commit c2fb56a256
3 changed files with 19 additions and 14 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
# Get OS info
# Determine OS platform
UNAME=$(uname | tr "[:upper:]" "[:lower:]")
DISTRO=""
# If Linux, try to determine specific distribution
if [ "$UNAME" == "linux" ]; then
# use /etc/os-release to get distro
DISTRO=$(cat /etc/os-release | awk -F= '/^ID=/{print $2}')
fi
echo "UNAME: $UNAME"
echo "DISTRO: $DISTRO"