aboutsummaryrefslogtreecommitdiff
path: root/nofetch
blob: dfd73229d77da47145128d5b1f2796567c555a55 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env bash

uname -o &> /dev/null

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

array="probably a computer
there's probably some ram in there
init should ideally be running
yeah
you should probably go outside
i would be lead to believe that / is mounted
hey, what's this knob do ?
do you have games on your phone ?
you mean to tell me there aren't little men in this box?
plan 4 from the front door
i use $osname btw
if you're reading this, it's already too late"

nofetch=$(echo "$array" | shuf -n 1)

if [ $1 == "-o" ] &> /dev/null || [ $2 == "-o" ] &> /dev/null
then
	echo "$osname"
elif [[ "$osname" == *"BSD"* ]]
then
	echo " "
	echo "> $nofetch" | tr '[:upper:]' '[:lower:]'
	echo "> $(uname -smr)" | tr '[:upper:]' '[:lower:]'
	echo " "
else
	echo " "
	echo "> $nofetch" | tr '[:upper:]' '[:lower:]'
	echo "> $osname $(uname -smr)" | tr '[:upper:]' '[:lower:]'
	echo " "
fi