aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjnats <jnats@salyut.one>2021-05-12 23:30:30 +0100
committerjnats <jnats@salyut.one>2021-05-12 23:30:30 +0100
commitd27de71911c7891e36bb2bc4df48df16b22a162c (patch)
tree98445749181667c08991d7ad886b5fadf27fa71b
parent32e79ba3256c825474f7d061d45fef66387f3831 (diff)
downloadnofetch-d27de71911c7891e36bb2bc4df48df16b22a162c.tar.gz
nofetch-d27de71911c7891e36bb2bc4df48df16b22a162c.tar.bz2
Update nofetch
-rwxr-xr-xnofetch10
1 files changed, 7 insertions, 3 deletions
diff --git a/nofetch b/nofetch
index b67d150..3d85eb2 100755
--- a/nofetch
+++ b/nofetch
@@ -12,10 +12,14 @@ else
fi
fi
-
-if [ -d /Library ]
+uname -o &> /dev/null
+if [ $? -eq 0 ]
+then
+ osname=$(uname -o)
+fi
+if [ $(uname -s) == "Darwin" ]
then
- osname="macOS"
+ 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')