abbiefetch/system_detection.2

35 lines
999 B
Groff
Raw Normal View History

2024-11-12 17:53:59 +00:00
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
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)" = "NetBSD" ] && [ "$system_type" = "unknown" ]; then
system_type="netbsd"
fi
if [ "$(uname -s)" = "Haiku" ] && [ "$system_type" = "unknown" ]; then
system_type="haiku"
fi
2024-11-12 18:59:15 +00:00
command -v winver.exe >>/dev/null
2024-11-12 18:59:36 +00:00
if [ "$?" -eq 0 ] && [ "$system_type" = "unknown" ]; then
2024-11-12 18:58:36 +00:00
system_type="windows"
if [ "$(uname -o)" = "Cygwin" ]; then
subtype="cygwin"
fi
fi