mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
added some comments to explain
This commit is contained in:
parent
a7bb5b5ac1
commit
548fc5c71c
5
inxi
5
inxi
|
@ -3405,11 +3405,14 @@ get_distro_data()
|
|||
if [[ -z $distro ]] && [[ $B_LSB_FILE == 'true' ]];then
|
||||
distro=$( get_distro_lsb_data )
|
||||
fi
|
||||
## finally, if all else has failed, give up
|
||||
# now some final null tries
|
||||
if [[ -z $distro ]];then
|
||||
# if the file was null but present, which can happen in some cases, then use the file name itself to
|
||||
# set the distro value. Why say unknown if we have a pretty good idea, after all?
|
||||
if [[ -n $distro_file ]] && [[ " $DISTROS_DERIVED $DISTROS_PRIMARY " == *" $distro_file "* ]];then
|
||||
distro=$( sed -E -e 's/[-_]//' -e 's/(release|version)//' <<< $distro_file | sed -E 's/^([a-z])/\u\1/' )
|
||||
fi
|
||||
## finally, if all else has failed, give up
|
||||
if [[ -z $distro ]];then
|
||||
distro='Unknown distro o_O'
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue