From cac22ec505d7ea79f3f0cc3c2992d71891409355 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 4 Mar 2019 10:16:52 +0200 Subject: [PATCH] general: Starting cutting script down in size. --- neofetch | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/neofetch b/neofetch index 577e281c..67449170 100755 --- a/neofetch +++ b/neofetch @@ -812,27 +812,26 @@ EOF # DETECT INFORMATION get_os() { - # $kernel_name is set in a function called cache_uname and is - # just the output of "uname -s". - case "$kernel_name" in - "Darwin"): "$darwin_name" ;; - "SunOS"): "Solaris" ;; - "Haiku"): "Haiku" ;; - "MINIX"): "MINIX" ;; - "AIX"): "AIX" ;; - "IRIX"*): "IRIX" ;; - "FreeMiNT"): "FreeMiNT" ;; + # $kernel_name is the output of 'uname -s'. + case $kernel_name in + Darwin): "$darwin_name" ;; + SunOS): Solaris ;; + Haiku): Haiku ;; + MINIX): MINIX ;; + AIX): AIX ;; + IRIX*): IRIX ;; + FreeMiNT): FreeMiNT ;; - "Linux" | "GNU"*) - : "Linux" + Linux|GNU*) + : Linux ;; - *"BSD" | "DragonFly" | "Bitrig") - : "BSD" + *BSD|DragonFly|Bitrig) + : BSD ;; - "CYGWIN"* | "MSYS"* | "MINGW"*) - : "Windows" + CYGWIN*|MSYS*|MINGW*) + : Windows ;; *) @@ -841,6 +840,7 @@ get_os() { exit 1 ;; esac + os="$_" }