attempt at konversation bug fix

This commit is contained in:
inxi-svn 2008-10-29 00:33:52 +00:00
parent b99cfc9df2
commit 41b9d5f2aa

13
inxi
View file

@ -438,7 +438,7 @@ get_parameters()
# Determine where infobash was run from
get_start_app()
{
local ircClientPath='' ircClientPathLower=''
local ircClientPath='' ircClientPathLower='' pidOfKonvi=''
if tty >/dev/null
then
@ -448,16 +448,21 @@ get_start_app()
elif [[ -n $PPID && -f /proc/$PPID/exe ]]
then
ircClientPath=$( readlink /proc/$PPID/exe )
# this handles the problem with konversation reporting itself as perl, which was missed because
# when konversation starts infobash from inside itself, as a script, the parent is konversation, not perl
if [ -z "$( grep -i 'konversation' <<< $ircClientPath )" -a -n "$( grep -i 'perl' <<< $ircClientPath )" -a -n "$( pidof konversation )" ]
then
ircClientPath=$( which konversation )
fi
ircClientPathLower=$( tr '[:upper:]' '[:lower:]' <<< $ircClientPath )
case $ircClientPathLower in
*irssi-text*|*irssi*)
IRC_CLIENT_VERSION=" $($ircClientPath -v | gawk 'NR == 1 { print $2 }')"
IRC_CLIENT_VERSION=" $( $ircClientPath -v | gawk 'NR == 1 { print $2 }' )"
IRC_CLIENT="Irssi"
;;
*konversation*)
KONVI=1
IRC_CLIENT_VERSION="$( $ircClientPath -v | gawk '/Konversation:/ { for (i=2;i<=NF;i++) { if (i == NF) { print $i } else { printf $i" " } } exit }' )"
IRC_CLIENT_VERSION=" $( $ircClientPath -v | gawk '/Konversation:/ { for (i=2;i<=NF;i++) { if (i == NF) { print $i } else { printf $i" " } } exit }' )"
T=($IRC_CLIENT_VERSION)
if [[ ${T[0]} == *+* ]]
then