aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnofetch9
1 files changed, 5 insertions, 4 deletions
diff --git a/nofetch b/nofetch
index 8ffc6d1..42651a1 100755
--- a/nofetch
+++ b/nofetch
@@ -13,15 +13,16 @@ else
fi
uname -o &> /dev/null
-if [ $? -eq 0 ]
-then
- osname=$(uname -o)
-elif [ $(uname -s) == "Darwin" ]
+
+if [ $(uname -s) == "Darwin" ]
then
osname=$(sw_vers | cut -d':' -f2- | head -n 1 | xargs)
elif [ -f /etc/os-release ]
then
osname=$(cat /etc/os-release | grep -w NAME | head -1 | sed 's/NAME=//g' | sed 's/\"//g' | sed 's/ Linux//g')
+elif [ $? -eq 0 ]
+then
+ osname=$(uname -o)
else
osname="Unknown"
fi