if [[ "$OSTYPE" == "linux-gnu" ]]; then
if [ -f /etc/redhat-release ]; then
echo "Redhat Linux detected."
elif [ -f /etc/SuSE-release ]; then
echo "Suse Linux detected."
elif [ -f /etc/arch-release ]; then
echo "Arch Linux detected."
elif [ -f /etc/mandrake-release ]; then
echo "Mandrake Linux detected."
elif [ -f /etc/debian_version ]; then
echo "Ubuntu/Debian Linux detected."
else
echo "Unknown Linux distribution."
fi
elif [[ "$OSTYPE" == "darwin"* ]]; then
echo "Mac OS (Darwin) detected."
elif [[ "$OSTYPE" == "freebsd"* ]]; then
echo "FreeBSD detected."
else
echo "Unknown operating system."
fi
https://getsubstrate.io
网友评论