aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjnats <dev@jnats.xyz>2021-04-24 11:11:48 +0100
committerGitHub <noreply@github.com>2021-04-24 11:11:48 +0100
commitb759c4af67020635969d14dafdcbb6096997e94a (patch)
treec72093fc40e065f1fba673416781053a91c6c535
parent27356e53475ace723dc01fc8e464ee6db8d8670b (diff)
downloadnofetch-b759c4af67020635969d14dafdcbb6096997e94a.tar.gz
nofetch-b759c4af67020635969d14dafdcbb6096997e94a.tar.bz2
works on macOS now
-rw-r--r--nofetch9
1 files changed, 7 insertions, 2 deletions
diff --git a/nofetch b/nofetch
index 66fda86..db61f55 100644
--- a/nofetch
+++ b/nofetch
@@ -36,9 +36,14 @@ else
nofetch="something has gone terribly wrong"
fi
-osname=$(cat /etc/os-release | grep -w NAME | head -1 | sed "s/NAME=//g" | sed "s/\"//g")
+if [ $(uname -s) == "Darwin" ]
+then
+ osname="macOS/"
+else
+ osname=$(cat /etc/os-release | grep -w NAME | head -1 | sed "s/NAME=//g" | sed "s/\"//g")" "
+fi
echo " "
echo " > $nofetch "
-echo " > $osname $(uname -smr)"
+echo " > $osname$(uname -smr)"
echo " "