function os::kernel() { uname -s | tr '[:upper:]' '[:lower:]' } function os::distro() { if [[ "$(os::kernel)" = "linux" ]] && [[ -f /etc/os-release ]]; then source /etc/os-release echo "$ID" | tr '[:upper:]' '[:lower:]' | sed 's/^arch$/archlinux/' return fi echo "unknown" }