.
This commit is contained in:
18
test.sh
18
test.sh
@@ -23,5 +23,23 @@ fi
|
|||||||
|
|
||||||
echo -e "${CS[color,LightGreen]}Detected system: $distrib_name${CS[color,Default]}"
|
echo -e "${CS[color,LightGreen]}Detected system: $distrib_name${CS[color,Default]}"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
arch=$(uname -m)
|
||||||
|
kernel=$(uname -r)
|
||||||
|
if [ -n "$(command -v lsb_release)" ]; then
|
||||||
|
distroname=$(lsb_release -s -d)
|
||||||
|
elif [ -f "/etc/os-release" ]; then
|
||||||
|
distroname=$(grep PRETTY_NAME /etc/os-release | sed 's/PRETTY_NAME=//g' | tr -d '="')
|
||||||
|
elif [ -f "/etc/debian_version" ]; then
|
||||||
|
distroname="Debian $(cat /etc/debian_version)"
|
||||||
|
elif [ -f "/etc/redhat-release" ]; then
|
||||||
|
distroname=$(cat /etc/redhat-release)
|
||||||
|
else
|
||||||
|
distroname="$(uname -s) $(uname -r)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "${distroname}"
|
||||||
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
Reference in New Issue
Block a user