Compare commits
No commits in common. "master" and "1.1.0" have entirely different histories.
13 changed files with 227 additions and 312 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
abbiefetch
|
30
README.md
30
README.md
|
@ -1,25 +1,17 @@
|
|||
# abbiefetch
|
||||
abbiefetch is a POSIX compliant fetch script intended to be as portable as possible to run on machines of any age. abbiefetch is not dependent on any specific shell and should run fine on any system with a POSIX compliant shell and Unix utilities.
|
||||
|
||||
## Building
|
||||
To build abbiefetch, clone this repository and run `./build.sh`. If you receive errors about `tee` having an invalid option then run `./build_alternate.sh`.
|
||||
|
||||
## Compatibility
|
||||
abbiefetch will attempt to gather as much information as possible on systems that don't have full compatibility and will provide you with a system type (and sometimes a subtype) to let you know what abbiefetch thinks your computer is running.
|
||||
|
||||
| Type string | System type | Subtype | Support since | Support type | Notes |
|
||||
| - | - | - | - | - | - |
|
||||
| `unknown` | Unknown kernel | | | None | Default when your system is unrecognised |
|
||||
| `linux` | Linux | | 1.0.0 | Full | |
|
||||
| `linux/android` | Linux | Android | `master` | Full | |
|
||||
| `linux/chumby` | Linux | Chumby internet appliances | 1.0.0 | Full | Uses chumby specific tools. |
|
||||
| `linux/proxmox` | Linux | Proxmox VE host | 1.0.0 | Full | |
|
||||
| `linux/rpi` | Linux | Raspberry Pi single board computer | 1.0.0 | Partial | Currently there are issues detecting the host machine and CPU. |
|
||||
| `openbsd` | OpenBSD | | 1.0.0 | Full | |
|
||||
| `netbsd` | NetBSD | | 1.1.0 | Full | |
|
||||
| `freebsd` | FreeBSD | | 1.1.0 | Full | |
|
||||
| `freebsd/dfly` | FreeBSD | DragonFly BSD | `master` | Full | DragonFly is a fork of FreeBSD which is similar enough that no modifications need be made. |
|
||||
| `haiku` | Haiku | | 1.1.0 | Partial | |
|
||||
| `windows` | Microsoft Windows | | 1.2.0 | Full | Relies on wmic.exe and systeminfo.exe |
|
||||
| `windows/cygwin` | Microsoft Windows | Cygwin | 1.2.0 | Partial | Relies on wmic.exe and systeminfo.exe, issues with machine detection |
|
||||
| `illumos` | illumos | | `master` | Partial | |
|
||||
| Type string | System type | Subtype | Support since |
|
||||
| - | - | - | - |
|
||||
| `unknown` | Unknown kernel | | |
|
||||
| `linux` | Linux | | 1.0.0 |
|
||||
| `linux/chumby` | Linux | Chumby internet appliances | 1.0.0 |
|
||||
| `linux/proxmox` | Linux | Proxmox VE host | 1.0.0 |
|
||||
| `linux/rpi` | Linux | Raspberry Pi single board computer | 1.0.0 |
|
||||
| `openbsd` | OpenBSD | | 1.0.0 |
|
||||
| `netbsd` | NetBSD | | 1.1.0 |
|
||||
| `freebsd` | FreeBSD | | 1.1.0 |
|
||||
| `haiku` | Haiku | | 1.1.0 |
|
||||
|
|
216
abbiefetch
Executable file
216
abbiefetch
Executable file
|
@ -0,0 +1,216 @@
|
|||
#!/bin/sh
|
||||
system_type="unknown"
|
||||
subtype="none"
|
||||
username="(user)"
|
||||
hostname="(none)"
|
||||
|
||||
hashostname=0
|
||||
hasawk=0
|
||||
haslspci=0
|
||||
hasglxinfo=0
|
||||
hassed=0
|
||||
|
||||
command -v hostname >>/dev/null
|
||||
if [ "$?" -eq 0 ]; then
|
||||
hashostname=1
|
||||
fi
|
||||
|
||||
command -v awk >>/dev/null
|
||||
if [ "$?" -eq 0 ]; then
|
||||
hasawk=1
|
||||
fi
|
||||
|
||||
command -v lspci >>/dev/null
|
||||
if [ "$?" -eq 0 ]; then
|
||||
haslspci=1
|
||||
fi
|
||||
|
||||
command -v glxinfo >>/dev/null
|
||||
if [ "$?" -eq 0 ]; then
|
||||
hasglxinfo=1
|
||||
fi
|
||||
|
||||
command -v sed >>/dev/null
|
||||
if [ "$?" -eq 0 ]; then
|
||||
hassed=1
|
||||
fi
|
||||
|
||||
|
||||
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
|
||||
|
||||
if [ "$hashostname" -eq 1 ]; then
|
||||
hostname="$(hostname)"
|
||||
elif [ -n "$(cat /etc/hostname)" ]; then
|
||||
hostname="$(cat /etc/hostname)"
|
||||
fi
|
||||
|
||||
if [ -n "$(whoami)" ]; then
|
||||
username="$(whoami)"
|
||||
fi
|
||||
|
||||
if [ "$hasawk" -eq 1 ] && [ $system_type = "openbsd" ] && [ -z "$processor" ]; then
|
||||
processor="$(sysctl hw.model | awk -F "=" '{print $2}')"
|
||||
fi
|
||||
if [ "$hasawk" -eq 1 ] && [ $system_type = "freebsd" ] && [ -z "$processor" ]; then
|
||||
processor="$(sysctl hw.model | awk -F ": " '{print $2}')"
|
||||
fi
|
||||
if [ "$hasawk" -eq 1 ] && [ $system_type = "netbsd" ] && [ -z "$processor" ]; then
|
||||
processor="$(sysctl machdep.cpu_brand | awk -F " = " '{print $2}')"
|
||||
fi
|
||||
if [ "$hasawk" -eq 1 ] && [ $system_type = "haiku" ] && [ -z "$processor" ]; then
|
||||
processor="$(sysinfo | grep "CPU #0" | awk -F "\"" '{ print $2 }')"
|
||||
fi
|
||||
if [ "$hasawk" -eq 1 ] && [ $system_type = "linux" ] && [ -z "$processor" ]; then
|
||||
if [ -n "$(cat /proc/cpuinfo | grep "model name" | head -n 1 | awk -F ": " '{print $2}')" ]; then
|
||||
processor="$(cat /proc/cpuinfo | grep "model name" | head -n 1 | awk -F ": " '{print $2}')"
|
||||
elif [ -n "$(cat /proc/cpuinfo | grep -v "cpuid" | grep -v "Hz" | grep -v "cpu number" | grep -v "cpu regs" | grep "cpu" | head -n 1 | awk -F ": " '{print $2}')" ]; then
|
||||
processor="$(cat /proc/cpuinfo | grep -v "cpuid" | grep -v "Hz" | grep -v "cpu number" | grep -v "cpu regs" | grep "cpu" | head -n 1 | awk -F ": " '{print $2}')"
|
||||
elif [ -n "$(cat /proc/cpuinfo | grep "Hardware" | head -n 1 | awk -F ": " '{print $2}')" ] && [ $subtype = "chumby" -o $subtype = "rpi" ]; then
|
||||
processor="$(cat /proc/cpuinfo | grep "Hardware" | head -n 1 | awk -F ": " '{print $2}')"
|
||||
elif [ -n "$(cat /proc/cpuinfo | grep "family" | head -n 1 | awk -F ": " '{print $2}')" ]; then
|
||||
processor="$(cat /proc/cpuinfo | grep "family" | head -n 1 | awk -F ": " '{print $2}')"
|
||||
elif [ -n "$(cat /proc/cpuinfo | grep "Processor" | head -n 1 | awk -F ": " '{print $2}')" ]; then
|
||||
processor="$(cat /proc/cpuinfo | grep "Processor" | head -n 1 | awk -F ": " '{print $2}')"
|
||||
fi
|
||||
fi
|
||||
if [ "$hassed" -eq 1 ] && [ "$hasawk" -eq 1 ] && [ -n "$processor" ]; then
|
||||
if [ -n "$(echo $processor | awk -F "@" '{print $1}' | sed "s/Processor//g" | sed "s/CPU//g" | sed "s/(R)//g" | sed "s/(r)//g" | sed "s/(TM)//g" | sed "s/(tm)//g" | tr -s " ")" ]; then
|
||||
processor="$(echo $processor | awk -F "@" '{print $1}' | sed "s/Processor//g" | sed "s/CPU//g" | sed "s/(R)//g" | sed "s/(r)//g" | sed "s/(TM)//g" | sed "s/(tm)//g" | tr -s " ")"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$(uname -r)" ] && [ -z "$kernel" ]; then
|
||||
kernel="$(uname -s) $(uname -r)"
|
||||
fi
|
||||
if [ -n "$(uname -s)" ] && [ -z "$kernel" ]; then
|
||||
kernel="$(uname -s)"
|
||||
fi
|
||||
|
||||
if [ "$hasglxinfo" -eq 1 ] && [ "$hasawk" -eq 1 ] && [ -z "$graphics" ]; then
|
||||
if [ -n "$(glxinfo 2>/dev/null | grep "OpenGL renderer string" | awk -F ": " '{print $2}' | awk -F "(" '{print $1}')" ]; then
|
||||
graphics="$(glxinfo 2>/dev/null | grep "OpenGL renderer string" | awk -F ": " '{print $2}' | awk -F "(" '{print $1}')"
|
||||
fi
|
||||
fi
|
||||
if [ "$haslspci" -eq 1 ] && [ "$hasawk" -eq 1 ] && [ -z "$graphics" ]; then
|
||||
if [ -n "$(lspci | grep "VGA compatible controller" | awk -F "controller: " '{print $2}')" ]; then
|
||||
graphics="$(lspci | grep "VGA compatible controller" | awk -F "controller: " '{print $2}')"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f /etc/lsb-release ] && [ $system_type = "linux" ]; then
|
||||
if [ "$hasawk" -eq 1 ] && [ -z "$distro" ]; then
|
||||
if [ -n "$(cat /etc/lsb-release | grep DISTRIB_DESCRIPTION | awk -F "\"" '{print $2}') $(cat /etc/lsb-release | grep DISTRIB_RELEASE | awk -F "\"" '{print $2}')" ] && [ "$(cat /etc/lsb-release | grep DISTRIB_RELEASE | awk -F "\"" '{print $2}')" != "rolling" ]; then
|
||||
distro="$(cat /etc/lsb-release | grep DISTRIB_DESCRIPTION | awk -F "\"" '{print $2}') $(cat /etc/lsb-release | grep DISTRIB_RELEASE | awk -F "\"" '{print $2}')"
|
||||
elif [ -n "$(cat /etc/lsb-release | grep DISTRIB_DESCRIPTION | awk -F "\"" '{print $2}')" ]; then
|
||||
distro="$(cat /etc/lsb-release | grep DISTRIB_DESCRIPTION | awk -F "\"" '{print $2}')"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ -f /etc/os-release ] && [ $system_type = "linux" ]; then
|
||||
if [ "$hasawk" -eq 1 ] && [ -z "$distro" ]; then
|
||||
if [ -n "$(cat /etc/os-release | grep PRETTY_NAME | awk -F "\"" '{print $2}')" ]; then
|
||||
distro="$(cat /etc/os-release | grep PRETTY_NAME | awk -F "\"" '{print $2}')"
|
||||
elif [ -n "$(cat /etc/os-release | grep NAME | awk -F "\"" '{print $2}')" ]; then
|
||||
distro="$(cat /etc/os-release | grep NAME | awk -F "\"" '{print $2}')"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ $subtype = "chumby" ]; then
|
||||
distro="Chumby firmware $(chumby_version -s)"
|
||||
if [ "$hasawk" -eq 1 ]; then
|
||||
if [ "$(chumby_version -h | awk -F "." '{print $1}')" = "3" ]; then
|
||||
machine="Chumby Classic"
|
||||
elif [ "$(chumby_version -h | awk -F "." '{print $1}')" = "10" ]; then
|
||||
machine="Chumby One"
|
||||
elif [ "$(chumby_version -h | awk -F "." '{print $1}')" = "7" ]; then
|
||||
machine="Insignia Infocast 3.5\""
|
||||
else
|
||||
machine="Chumby-enabled device"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ $subtype = "proxmox" ]; then
|
||||
if [ "$hasawk" -eq 1 ]; then
|
||||
if [ -n "$(pveversion | awk -F "/" '{ print $2 }')" ]; then
|
||||
distro="Proxmox VE $(pveversion | awk -F "/" '{ print $2 }')"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ $system_type = "openbsd" ]; then
|
||||
if [ "$hasawk" -eq 1 ]; then
|
||||
distro="revision $(sysctl kern.osrevision | awk -F "=" '{print $2}')"
|
||||
machine="$(sysctl hw.vendor | awk -F "=" '{print $2}') $(sysctl hw.product | awk -F "=" '{print $2}')"
|
||||
fi
|
||||
fi
|
||||
if [ $system_type = "freebsd" ]; then
|
||||
if [ "$hasawk" -eq 1 ]; then
|
||||
distro="revision $(sysctl kern.osrevision | awk -F ": " '{print $2}')"
|
||||
fi
|
||||
machine="$(kenv smbios.system.maker) $(kenv smbios.system.product)"
|
||||
fi
|
||||
if [ $system_type = "netbsd" ]; then
|
||||
if [ "$hasawk" -eq 1 ]; then
|
||||
distro="revision $(sysctl kern.osrevision | awk -F " = " '{print $2}')"
|
||||
machine="$(sysctl machdep.dmi.system-vendor | awk -F " = " '{print $2}') $(sysctl machdep.dmi.system-product | awk -F " = " '{print $2}')"
|
||||
fi
|
||||
fi
|
||||
if [ $system_type = "haiku" ]; then
|
||||
distro="$(uname -v)"
|
||||
fi
|
||||
|
||||
if [ $system_type = "linux" ] && [ -z "$machine" ]; then
|
||||
if [ -f "/sys/devices/virtual/dmi/id/product_name" ]; then
|
||||
machine="$(cat /sys/devices/virtual/dmi/id/product_name)"
|
||||
fi
|
||||
if [ -f "/sys/devices/virtual/dmi/id/sys_vendor" ]; then
|
||||
machine="$(cat /sys/devices/virtual/dmi/id/sys_vendor) $machine"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$subtype" = "none" ]; then
|
||||
echo "$username@$hostname ($system_type)"
|
||||
else
|
||||
echo "$username@$hostname ($system_type/$subtype)"
|
||||
fi
|
||||
echo
|
||||
if [ -n "$processor" ]; then
|
||||
echo "cpu: $processor"
|
||||
fi
|
||||
if [ -n "$graphics" ]; then
|
||||
echo "gpu: $graphics"
|
||||
fi
|
||||
if [ -n "$kernel" ]; then
|
||||
echo "krn: $kernel"
|
||||
fi
|
||||
if [ -n "$distro" ]; then
|
||||
echo "sys: $distro"
|
||||
fi
|
||||
if [ -n "$machine" ]; then
|
||||
echo "mac: $machine"
|
||||
fi
|
10
build.sh
10
build.sh
|
@ -1,10 +0,0 @@
|
|||
#!/bin/sh
|
||||
cat probing.1 | tee -p abbiefetch
|
||||
cat system_detection.2 | tee -ap abbiefetch
|
||||
cat hostname_username.3 | tee -ap abbiefetch
|
||||
cat processor_detection.4 | tee -ap abbiefetch
|
||||
cat kernel_info.5 | tee -ap abbiefetch
|
||||
cat gpu_detection.6 | tee -ap abbiefetch
|
||||
cat distro_machine_detection.7 | tee -ap abbiefetch
|
||||
cat display_results.8 | tee -ap abbiefetch
|
||||
chmod +x abbiefetch
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/sh
|
||||
cat probing.1 | tee abbiefetch
|
||||
cat system_detection.2 | tee -a abbiefetch
|
||||
cat hostname_username.3 | tee -a abbiefetch
|
||||
cat processor_detection.4 | tee -a abbiefetch
|
||||
cat kernel_info.5 | tee -a abbiefetch
|
||||
cat gpu_detection.6 | tee -a abbiefetch
|
||||
cat distro_machine_detection.7 | tee -a abbiefetch
|
||||
cat display_results.8 | tee -a abbiefetch
|
||||
chmod +x abbiefetch
|
|
@ -1,25 +0,0 @@
|
|||
if [ "$subtype" = "none" ]; then
|
||||
echo "$username@$hostname ($system_type)"
|
||||
else
|
||||
echo "$username@$hostname ($system_type/$subtype)"
|
||||
fi
|
||||
echo
|
||||
if [ -n "$processor" ]; then
|
||||
echo "cpu: $processor"
|
||||
fi
|
||||
if [ -n "$graphics" ]; then
|
||||
echo "gpu: $graphics"
|
||||
fi
|
||||
if [ -n "$kernel" ]; then
|
||||
echo "krn: $kernel"
|
||||
fi
|
||||
if [ -n "$distro" ]; then
|
||||
if [ "$system_type" = "windows" ]; then
|
||||
echo "sys:$distro"
|
||||
else
|
||||
echo "sys: $distro"
|
||||
fi
|
||||
fi
|
||||
if [ -n "$machine" ]; then
|
||||
echo "mac: $machine"
|
||||
fi
|
|
@ -1,89 +0,0 @@
|
|||
if [ -f /etc/lsb-release ] && [ "$system_type" = "linux" ]; then
|
||||
if [ "$hasawk" -eq 1 ] && [ -z "$distro" ]; then
|
||||
if [ -n "$(cat /etc/lsb-release | grep DISTRIB_DESCRIPTION | awk -F "\"" '{print $2}') $(cat /etc/lsb-release | grep DISTRIB_RELEASE | awk -F "\"" '{print $2}')" ] && [ "$(cat /etc/lsb-release | grep DISTRIB_RELEASE | awk -F "\"" '{print $2}')" != "rolling" ]; then
|
||||
distro="$(cat /etc/lsb-release | grep DISTRIB_DESCRIPTION | awk -F "\"" '{print $2}') $(cat /etc/lsb-release | grep DISTRIB_RELEASE | awk -F "\"" '{print $2}')"
|
||||
elif [ -n "$(cat /etc/lsb-release | grep DISTRIB_DESCRIPTION | awk -F "\"" '{print $2}')" ]; then
|
||||
distro="$(cat /etc/lsb-release | grep DISTRIB_DESCRIPTION | awk -F "\"" '{print $2}')"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ -f /etc/os-release ] && [ "$system_type" = "linux" ]; then
|
||||
if [ "$hasawk" -eq 1 ] && [ -z "$distro" ]; then
|
||||
if [ -n "$(cat /etc/os-release | grep PRETTY_NAME | awk -F "\"" '{print $2}')" ]; then
|
||||
distro="$(cat /etc/os-release | grep PRETTY_NAME | awk -F "\"" '{print $2}')"
|
||||
elif [ -n "$(cat /etc/os-release | grep NAME | awk -F "\"" '{print $2}')" ]; then
|
||||
distro="$(cat /etc/os-release | grep NAME | awk -F "\"" '{print $2}')"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ "$subtype" = "chumby" ]; then
|
||||
distro="Chumby firmware $(chumby_version -s)"
|
||||
if [ "$hasawk" -eq 1 ]; then
|
||||
if [ "$(chumby_version -h | awk -F "." '{print $1}')" = "3" ]; then
|
||||
machine="Chumby Classic"
|
||||
elif [ "$(chumby_version -h | awk -F "." '{print $1}')" = "10" ]; then
|
||||
machine="Chumby One"
|
||||
elif [ "$(chumby_version -h | awk -F "." '{print $1}')" = "7" ]; then
|
||||
machine="Insignia Infocast 3.5\""
|
||||
else
|
||||
machine="Chumby-enabled device"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ "$subtype" = "proxmox" ]; then
|
||||
if [ "$hasawk" -eq 1 ]; then
|
||||
if [ -n "$(pveversion | awk -F "/" '{ print $2 }')" ]; then
|
||||
distro="Proxmox VE $(pveversion | awk -F "/" '{ print $2 }')"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ "$subtype" = "android" ]; then
|
||||
if [ -n "$(getprop ro.product.manufacturer)$(getprop ro.product.model)" ]; then
|
||||
machine="$(getprop ro.product.manufacturer) $(getprop ro.product.model)"
|
||||
fi
|
||||
if [ -n "$(getprop ro.build.version.release)" ]; then
|
||||
distro="Android $(getprop ro.build.version.release)"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$system_type" = "openbsd" ]; then
|
||||
if [ "$hasawk" -eq 1 ]; then
|
||||
distro="revision $(sysctl kern.osrevision | awk -F "=" '{print $2}')"
|
||||
machine="$(sysctl hw.vendor | awk -F "=" '{print $2}') $(sysctl hw.product | awk -F "=" '{print $2}')"
|
||||
fi
|
||||
fi
|
||||
if [ "$system_type" = "freebsd" ]; then
|
||||
if [ "$hasawk" -eq 1 ]; then
|
||||
distro="revision $(sysctl kern.osrevision | awk -F ": " '{print $2}')"
|
||||
fi
|
||||
machine="$(kenv smbios.system.maker) $(kenv smbios.system.product)"
|
||||
fi
|
||||
if [ "$system_type" = "netbsd" ]; then
|
||||
if [ "$hasawk" -eq 1 ]; then
|
||||
distro="revision $(sysctl kern.osrevision | awk -F " = " '{print $2}')"
|
||||
machine="$(sysctl machdep.dmi.system-vendor | awk -F " = " '{print $2}') $(sysctl machdep.dmi.system-product | awk -F " = " '{print $2}')"
|
||||
fi
|
||||
fi
|
||||
if [ "$system_type" = "haiku" ]; then
|
||||
distro="$(uname -v)"
|
||||
fi
|
||||
|
||||
if [ "$system_type" = "linux" ] && [ -z "$machine" ]; then
|
||||
if [ -f "/sys/devices/virtual/dmi/id/product_name" ]; then
|
||||
machine="$(cat /sys/devices/virtual/dmi/id/product_name)"
|
||||
fi
|
||||
if [ -f "/sys/devices/virtual/dmi/id/sys_vendor" ]; then
|
||||
machine="$(cat /sys/devices/virtual/dmi/id/sys_vendor) $machine"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$system_type" = "windows" ] && [ -z "$machine"] && [ "$hassed" -eq 1 ]; then
|
||||
if [ "$hasawk" -eq 1 ]; then
|
||||
distro="$(systeminfo.exe 2>/dev/null | grep -v "BIOS" | grep "OS Version" | awk -F ":" '{print $2}' | tr -s " ")"
|
||||
fi
|
||||
if [ "$subtype" = "cygwin" ]; then
|
||||
machine=0
|
||||
else
|
||||
machine="$(wmic.exe computersystem get Manufacturer | sed -n 2p | head -n 1 | tr -s " ")$(wmic.exe computersystem get Model | sed -n 2p | head -n 1)"
|
||||
fi
|
||||
fi
|
|
@ -1,10 +0,0 @@
|
|||
if [ "$hasglxinfo" -eq 1 ] && [ "$hasawk" -eq 1 ] && [ -z "$graphics" ]; then
|
||||
if [ -n "$(glxinfo 2>/dev/null | grep "OpenGL renderer string" | awk -F ": " '{print $2}' | awk -F "(" '{print $1}')" ]; then
|
||||
graphics="$(glxinfo 2>/dev/null | grep "OpenGL renderer string" | awk -F ": " '{print $2}' | awk -F "(" '{print $1}')"
|
||||
fi
|
||||
fi
|
||||
if [ "$haslspci" -eq 1 ] && [ "$hasawk" -eq 1 ] && [ -z "$graphics" ]; then
|
||||
if [ -n "$(lspci | grep "VGA compatible controller" | awk -F "controller: " '{print $2}')" ]; then
|
||||
graphics="$(lspci | grep "VGA compatible controller" | awk -F "controller: " '{print $2}')"
|
||||
fi
|
||||
fi
|
|
@ -1,9 +0,0 @@
|
|||
if [ "$hashostname" -eq 1 ]; then
|
||||
hostname="$(hostname)"
|
||||
elif [ -n "$(cat /etc/hostname)" ]; then
|
||||
hostname="$(cat /etc/hostname)"
|
||||
fi
|
||||
|
||||
if [ -n "$(whoami)" ]; then
|
||||
username="$(whoami)"
|
||||
fi
|
|
@ -1,9 +0,0 @@
|
|||
if [ -n "$(uname -r)" ] && [ -z "$kernel" ]; then
|
||||
kernel="$(uname -s) $(uname -r)"
|
||||
fi
|
||||
if [ -n "$(uname -s)" ] && [ -z "$kernel" ]; then
|
||||
kernel="$(uname -s)"
|
||||
fi
|
||||
if [ "$system_type" = "illumos" ]; then
|
||||
kernel="$(uname -v)"
|
||||
fi
|
37
probing.1
37
probing.1
|
@ -1,37 +0,0 @@
|
|||
#!/bin/sh
|
||||
system_type="unknown"
|
||||
subtype="none"
|
||||
username="(user)"
|
||||
hostname="(none)"
|
||||
|
||||
hashostname=0
|
||||
hasawk=0
|
||||
haslspci=0
|
||||
hasglxinfo=0
|
||||
hassed=0
|
||||
|
||||
command -v hostname >>/dev/null
|
||||
if [ "$?" -eq 0 ]; then
|
||||
hashostname=1
|
||||
fi
|
||||
|
||||
command -v awk >>/dev/null
|
||||
if [ "$?" -eq 0 ]; then
|
||||
hasawk=1
|
||||
fi
|
||||
|
||||
command -v lspci >>/dev/null
|
||||
if [ "$?" -eq 0 ]; then
|
||||
haslspci=1
|
||||
fi
|
||||
|
||||
command -v glxinfo >>/dev/null
|
||||
if [ "$?" -eq 0 ]; then
|
||||
hasglxinfo=1
|
||||
fi
|
||||
|
||||
command -v sed >>/dev/null
|
||||
if [ "$?" -eq 0 ]; then
|
||||
hassed=1
|
||||
fi
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
if [ "$hasawk" -eq 1 ] && [ "$system_type" = "openbsd" ] && [ -z "$processor" ]; then
|
||||
processor="$(sysctl hw.model | awk -F "=" '{print $2}')"
|
||||
fi
|
||||
if [ "$hasawk" -eq 1 ] && [ "$system_type" = "freebsd" ] && [ -z "$processor" ]; then
|
||||
processor="$(sysctl hw.model | awk -F ": " '{print $2}')"
|
||||
fi
|
||||
if [ "$hasawk" -eq 1 ] && [ "$system_type" = "netbsd" ] && [ -z "$processor" ]; then
|
||||
processor="$(sysctl machdep.cpu_brand | awk -F " = " '{print $2}')"
|
||||
fi
|
||||
if [ "$hasawk" -eq 1 ] && [ "$system_type" = "haiku" ] && [ -z "$processor" ]; then
|
||||
processor="$(sysinfo | grep "CPU #0" | awk -F "\"" '{ print $2 }')"
|
||||
fi
|
||||
if [ "$hasawk" -eq 1 ] && [ "$system_type" = "linux" ] || [ "$system_type" = "windows" -a "$subtype" = "cygwin" ] && [ -z "$processor" ]; then
|
||||
if [ -n "$(cat /proc/cpuinfo | grep "model name" | head -n 1 | awk -F ": " '{print $2}')" ]; then
|
||||
processor="$(cat /proc/cpuinfo | grep "model name" | head -n 1 | awk -F ": " '{print $2}')"
|
||||
elif [ -n "$(cat /proc/cpuinfo | grep -v "cpuid" | grep -v "Hz" | grep -v "cpu number" | grep -v "cpu regs" | grep "cpu" | head -n 1 | awk -F ": " '{print $2}')" ]; then
|
||||
processor="$(cat /proc/cpuinfo | grep -v "cpuid" | grep -v "Hz" | grep -v "cpu number" | grep -v "cpu regs" | grep "cpu" | head -n 1 | awk -F ": " '{print $2}')"
|
||||
elif [ -n "$(cat /proc/cpuinfo | grep "Hardware" | head -n 1 | awk -F ": " '{print $2}')" ] && [ "$subtype" = "chumby" -o "$subtype" = "rpi" ]; then
|
||||
processor="$(cat /proc/cpuinfo | grep "Hardware" | head -n 1 | awk -F ": " '{print $2}')"
|
||||
elif [ -n "$(cat /proc/cpuinfo | grep "family" | head -n 1 | awk -F ": " '{print $2}')" ]; then
|
||||
processor="$(cat /proc/cpuinfo | grep "family" | head -n 1 | awk -F ": " '{print $2}')"
|
||||
elif [ -n "$(cat /proc/cpuinfo | grep "Processor" | head -n 1 | awk -F ": " '{print $2}')" ]; then
|
||||
processor="$(cat /proc/cpuinfo | grep "Processor" | head -n 1 | awk -F ": " '{print $2}')"
|
||||
fi
|
||||
fi
|
||||
if [ "$hassed" -eq 1 ] && [ "$system_type" = "windows" ] && [ -z "$processor" ]; then
|
||||
if [ -n "$(wmic.exe cpu get name | sed -n 2p | head -n 1)" ]; then
|
||||
processor="$(wmic.exe cpu get name | sed -n 2p | head -n 1)"
|
||||
fi
|
||||
fi
|
||||
if [ "$subtype" = "android" ]; then
|
||||
if [ -n "$(getprop ro.soc.manufacturer)$(getprop ro.soc.model)" ]; then
|
||||
processor="$(getprop ro.soc.manufacturer) $(getprop ro.soc.model)"
|
||||
elif [ -n "$(getprop ro.hardware.chipname)" ]; then
|
||||
processor="$(getprop ro.hardware.chipname)"
|
||||
fi
|
||||
fi
|
||||
if [ "$hasawk" -eq 1 ] && [ "$system_type" = "illumos" ] && [ -z "$processor" ]; then
|
||||
if [ -n "$(kstat | grep brand)" ]; then
|
||||
processor="$(kstat | grep brand | head -n 1 | tr -s " " | awk -F "brand " '{print $2}')"
|
||||
fi
|
||||
fi
|
||||
if [ "$hassed" -eq 1 ] && [ "$hasawk" -eq 1 ] && [ -n "$processor" ]; then
|
||||
if [ -n "$(echo $processor | awk -F "@" '{print $1}' | sed "s/Processor//g" | sed "s/CPU//g" | sed "s/(R)//g" | sed "s/(r)//g" | sed "s/(TM)//g" | sed "s/(tm)//g" | tr -s " ")" ]; then
|
||||
processor="$(echo $processor | awk -F "@" '{print $1}' | sed "s/Processor//g" | sed "s/CPU//g" | sed "s/(R)//g" | sed "s/(r)//g" | sed "s/(TM)//g" | sed "s/(tm)//g" | tr -s " ")"
|
||||
fi
|
||||
fi
|
|
@ -1,46 +0,0 @@
|
|||
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
|
||||
if [ "$(uname -o)" = "illumos" ] && [ "$system_type" = "unknown" ]; then
|
||||
system_type="illumos"
|
||||
fi
|
Loading…
Reference in a new issue