abbiefetch/system_detection.2

47 lines
1.3 KiB
Groff
Raw Permalink 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
2024-11-13 16:23:19 +00:00
command -v getprop >>/dev/null
if [ "$?" -eq 0 ] && [ "$subtype" = "none" ]; then
subtype="android"
2024-11-13 16:24:59 +00:00
haslspci=0
2024-11-13 16:23:19 +00:00
fi
2024-11-12 17:53:59 +00:00
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
2024-11-12 17:53:59 +00:00
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
if [ "$(uname -o)" = "illumos" ] && [ "$system_type" = "unknown" ]; then
system_type="illumos"
fi