bug fix, forgot the null file case

This commit is contained in:
inxi-svn 2011-07-27 23:56:42 +00:00
parent 856ed2bc1b
commit a7bb5b5ac1

2
inxi
View file

@ -3407,7 +3407,7 @@ get_distro_data()
fi fi
## finally, if all else has failed, give up ## finally, if all else has failed, give up
if [[ -z $distro ]];then if [[ -z $distro ]];then
if [[ " $DISTROS_DERIVED $DISTROS_PRIMARY " == *" $distro_file "* ]];then 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/' ) distro=$( sed -E -e 's/[-_]//' -e 's/(release|version)//' <<< $distro_file | sed -E 's/^([a-z])/\u\1/' )
fi fi
if [[ -z $distro ]];then if [[ -z $distro ]];then