small patch for inxi unknown distro, this is a bug fix, so it's a version bump too.

This commit is contained in:
inxi-svn 2011-07-27 23:54:37 +00:00
parent 48ae838480
commit 856ed2bc1b

9
inxi
View file

@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
######################################################################## ########################################################################
#### Script Name: inxi #### Script Name: inxi
#### version: 1.7.22 #### version: 1.7.23
#### Date: July 25 2011 #### Date: July 27 2011
#### Patch Number: 00 #### Patch Number: 00
######################################################################## ########################################################################
#### SPECIAL THANKS #### SPECIAL THANKS
@ -3406,9 +3406,14 @@ get_distro_data()
distro=$( get_distro_lsb_data ) distro=$( get_distro_lsb_data )
fi fi
## finally, if all else has failed, give up ## finally, if all else has failed, give up
if [[ -z $distro ]];then
if [[ " $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
if [[ -z $distro ]];then if [[ -z $distro ]];then
distro='Unknown distro o_O' distro='Unknown distro o_O'
fi fi
fi
# this handles an arch bug where /etc/arch-release is empty and /etc/issue is corrupted # this handles an arch bug where /etc/arch-release is empty and /etc/issue is corrupted
if [[ -n $( grep -i 'arch linux' <<< $distro ) ]];then if [[ -n $( grep -i 'arch linux' <<< $distro ) ]];then