abbiefetch/system_detection.2

43 lines
1.2 KiB
Groff

if [ "$(uname -s)" = "Linux" ] && [ "$system_type" = "unknown" ]; then
system_type="linux"
command -v chumby_version >>/dev/null
if [ "$?" -eq 0 ] && [ "$subtype" = "none" ]; then
subtype="chumby"
fi
command -v raspi-config >>/dev/null
if [ "$?" -eq 0 ] && [ "$subtype" = "none" ]; then
subtype="rpi"
fi
command -v pveversion >>/dev/null
if [ "$?" -eq 0 ] && [ "$subtype" = "none" ]; then
subtype="proxmox"
fi
command -v getprop >>/dev/null
if [ "$?" -eq 0 ] && [ "$subtype" = "none" ]; then
subtype="android"
haslspci=0
fi
fi
if [ "$(uname -s)" = "OpenBSD" ] && [ "$system_type" = "unknown" ]; then
system_type="openbsd"
fi
if [ "$(uname -s)" = "FreeBSD" ] && [ "$system_type" = "unknown" ]; then
system_type="freebsd"
fi
if [ "$(uname -s)" = "DragonFly" ] && [ "$system_type" = "unknown" ]; then
system_type="freebsd"
subtype="dfly"
fi
if [ "$(uname -s)" = "NetBSD" ] && [ "$system_type" = "unknown" ]; then
system_type="netbsd"
fi
if [ "$(uname -s)" = "Haiku" ] && [ "$system_type" = "unknown" ]; then
system_type="haiku"
fi
command -v winver.exe >>/dev/null
if [ "$?" -eq 0 ] && [ "$system_type" = "unknown" ]; then
system_type="windows"
if [ "$(uname -o)" = "Cygwin" ]; then
subtype="cygwin"
fi
fi