fixed an old bug, sed -E is not supported in very old systems, and is actually not documented in man sed for GNU at all.

That's a bsd method, which slipped into inxi, I've replaced that with -r which is the correct syntax, and which will work
on old linux systems as well as new.

Since there is no functional change and only very old installs would ever see the difference, I'm leaving the version number
alone. New tarball as well.
This commit is contained in:
inxi-svn 2012-12-06 20:05:26 +00:00
parent 2def7edd22
commit b8382ecb68

8
inxi
View file

@ -2,7 +2,7 @@
########################################################################
#### Script Name: inxi
#### version: 1.8.24
#### Date: December 5 2012
#### Date: December 6 2012
#### Patch Number: 00
########################################################################
#### SPECIAL THANKS
@ -3712,7 +3712,7 @@ get_distro_data()
# 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/' )
distro=$( sed -r -e 's/[-_]//' -e 's/(release|version)//' <<< $distro_file | sed -r 's/^([a-z])/\u\1/' )
fi
## finally, if all else has failed, give up
if [[ -z $distro ]];then
@ -3890,7 +3890,7 @@ get_gcc_system_version()
eval $LOGFS
local separator='' gcc_installed='' gcc_list='' gcc_others='' temp_array=''
local gcc_version=$(
gcc --version 2>/dev/null | sed -E 's/\([^\)]*\)//g' | gawk '
gcc --version 2>/dev/null | sed -r 's/\([^\)]*\)//g' | gawk '
BEGIN {
IGNORECASE=1
}
@ -6526,7 +6526,7 @@ get_shell_data()
if [[ $B_EXTRA_DATA == 'true' && -n $shell_type ]];then
case $shell_type in
bash)
shell_version=$( get_de_app_version "$shell_type" "^GNU[[:space:]]bash,[[:space:]]version" "4" | sed -E 's/(\(.*|-release|-version)//' )
shell_version=$( get_de_app_version "$shell_type" "^GNU[[:space:]]bash,[[:space:]]version" "4" | sed -r 's/(\(.*|-release|-version)//' )
;;
# csh/dash use dpkg package version data, debian/buntu only
csh)