From 6244bbb1da67fc11128be6366435459381612edb Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 31 May 2018 15:05:22 +1000 Subject: [PATCH] os: cleanup --- neofetch | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/neofetch b/neofetch index a14120b3..f93c9009 100755 --- a/neofetch +++ b/neofetch @@ -782,16 +782,26 @@ get_os() { # $kernel_name is set in a function called cache_uname and is # just the output of "uname -s". case "$kernel_name" in - "Linux" | "GNU"*) os="Linux" ;; - "Darwin") os="$(sw_vers -productName)" ;; - *"BSD" | "DragonFly" | "Bitrig") os="BSD" ;; - "CYGWIN"* | "MSYS"* | "MINGW"*) os="Windows" ;; - "SunOS") os="Solaris" ;; - "Haiku") os="Haiku" ;; - "MINIX") os="MINIX" ;; - "AIX") os="AIX" ;; - "IRIX"*) os="IRIX" ;; + "Darwin") os="$(sw_vers -productName)" ;; + "SunOS") os="Solaris" ;; + "Haiku") os="Haiku" ;; + "MINIX") os="MINIX" ;; + "AIX") os="AIX" ;; + "IRIX"*) os="IRIX" ;; "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" "Open an issue on GitHub to add support for your OS." >&2