mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
added in a null case check
This commit is contained in:
parent
8561e00ca9
commit
9df881c11f
24
inxi
24
inxi
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue