diff options
author | jnats <jnats@salyut.one> | 2021-05-19 13:05:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-19 13:05:56 +0100 |
commit | f055c114d9618b12b5b09d110f820fcf5b5a3f6f (patch) | |
tree | 46137af8bfa38d49dac74bd6d76520941b7b01bd /nofetch | |
parent | 9b95245de6c2c65c350db3cc43879d88498b1959 (diff) | |
download | nofetch-f055c114d9618b12b5b09d110f820fcf5b5a3f6f.tar.gz nofetch-f055c114d9618b12b5b09d110f820fcf5b5a3f6f.tar.bz2 |
fixed osname priority issue
Diffstat (limited to 'nofetch')
-rwxr-xr-x | nofetch | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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 |