added in a null case check

This commit is contained in:
inxi-svn 2011-05-27 20:49:47 +00:00
parent 8561e00ca9
commit 9df881c11f

24
inxi
View file

@ -2874,17 +2874,19 @@ get_de_version()
;; ;;
esac esac
version=$( gawk ' if [[ -n $version_data ]];then
BEGIN { version=$( gawk '
IGNORECASE=1 BEGIN {
} IGNORECASE=1
/'$2'/ { }
# sample: dwm-5.8.2, ©.. etc, why no space? who knows. Also get rid of v in number string /'$2'/ {
# xfce, and other, output has , in it, so dump all commas # sample: dwm-5.8.2, ©.. etc, why no space? who knows. Also get rid of v in number string
gsub(/(,|dwm-|wmii-|v|V)/, "",$'$3') # xfce, and other, output has , in it, so dump all commas
print $'$3' gsub(/(,|dwm-|wmii-|v|V)/, "",$'$3')
exit # quit after first match prints print $'$3'
}' <<< "$version_data" ) exit # quit after first match prints
}' <<< "$version_data" )
fi
echo $version echo $version
} }