os: cleanup
This commit is contained in:
parent
2bb28bb67b
commit
6244bbb1da
1 changed files with 19 additions and 9 deletions
28
neofetch
28
neofetch
|
@ -782,16 +782,26 @@ get_os() {
|
||||||
# $kernel_name is set in a function called cache_uname and is
|
# $kernel_name is set in a function called cache_uname and is
|
||||||
# just the output of "uname -s".
|
# just the output of "uname -s".
|
||||||
case "$kernel_name" in
|
case "$kernel_name" in
|
||||||
"Linux" | "GNU"*) os="Linux" ;;
|
"Darwin") os="$(sw_vers -productName)" ;;
|
||||||
"Darwin") os="$(sw_vers -productName)" ;;
|
"SunOS") os="Solaris" ;;
|
||||||
*"BSD" | "DragonFly" | "Bitrig") os="BSD" ;;
|
"Haiku") os="Haiku" ;;
|
||||||
"CYGWIN"* | "MSYS"* | "MINGW"*) os="Windows" ;;
|
"MINIX") os="MINIX" ;;
|
||||||
"SunOS") os="Solaris" ;;
|
"AIX") os="AIX" ;;
|
||||||
"Haiku") os="Haiku" ;;
|
"IRIX"*) os="IRIX" ;;
|
||||||
"MINIX") os="MINIX" ;;
|
|
||||||
"AIX") os="AIX" ;;
|
|
||||||
"IRIX"*) os="IRIX" ;;
|
|
||||||
"FreeMiNT") os="FreeMiNT" ;;
|
"FreeMiNT") os="FreeMiNT" ;;
|
||||||
|
|
||||||
|
"Linux" | "GNU"*)
|
||||||
|
os="Linux"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*"BSD" | "DragonFly" | "Bitrig")
|
||||||
|
os="BSD"
|
||||||
|
;;
|
||||||
|
|
||||||
|
"CYGWIN"* | "MSYS"* | "MINGW"*)
|
||||||
|
os="Windows"
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
printf "%s\n" "Unknown OS detected: '$kernel_name', aborting..." >&2
|
printf "%s\n" "Unknown OS detected: '$kernel_name', aborting..." >&2
|
||||||
printf "%s\n" "Open an issue on GitHub to add support for your OS." >&2
|
printf "%s\n" "Open an issue on GitHub to add support for your OS." >&2
|
||||||
|
|
Loading…
Reference in a new issue