added some comments to explain

This commit is contained in:
inxi-svn 2011-07-28 00:02:05 +00:00
parent a7bb5b5ac1
commit 548fc5c71c

5
inxi
View file

@ -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