From 856ed2bc1bc36ab9a4f29d5addb1a2df627d739e Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Wed, 27 Jul 2011 23:54:37 +0000 Subject: [PATCH] small patch for inxi unknown distro, this is a bug fix, so it's a version bump too. --- inxi | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/inxi b/inxi index 51e0c31..a70d4be 100755 --- a/inxi +++ b/inxi @@ -1,8 +1,8 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 1.7.22 -#### Date: July 25 2011 +#### version: 1.7.23 +#### Date: July 27 2011 #### Patch Number: 00 ######################################################################## #### SPECIAL THANKS @@ -3407,7 +3407,12 @@ get_distro_data() fi ## finally, if all else has failed, give up if [[ -z $distro ]];then - distro='Unknown distro o_O' + 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 + distro='Unknown distro o_O' + fi fi # this handles an arch bug where /etc/arch-release is empty and /etc/issue is corrupted