mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
attempt at konversation bug fix
This commit is contained in:
parent
b99cfc9df2
commit
41b9d5f2aa
13
inxi
13
inxi
|
@ -438,7 +438,7 @@ get_parameters()
|
||||||
# Determine where infobash was run from
|
# Determine where infobash was run from
|
||||||
get_start_app()
|
get_start_app()
|
||||||
{
|
{
|
||||||
local ircClientPath='' ircClientPathLower=''
|
local ircClientPath='' ircClientPathLower='' pidOfKonvi=''
|
||||||
|
|
||||||
if tty >/dev/null
|
if tty >/dev/null
|
||||||
then
|
then
|
||||||
|
@ -448,16 +448,21 @@ get_start_app()
|
||||||
elif [[ -n $PPID && -f /proc/$PPID/exe ]]
|
elif [[ -n $PPID && -f /proc/$PPID/exe ]]
|
||||||
then
|
then
|
||||||
ircClientPath=$( readlink /proc/$PPID/exe )
|
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 )
|
ircClientPathLower=$( tr '[:upper:]' '[:lower:]' <<< $ircClientPath )
|
||||||
|
|
||||||
case $ircClientPathLower in
|
case $ircClientPathLower in
|
||||||
*irssi-text*|*irssi*)
|
*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"
|
IRC_CLIENT="Irssi"
|
||||||
;;
|
;;
|
||||||
*konversation*)
|
*konversation*)
|
||||||
KONVI=1
|
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)
|
T=($IRC_CLIENT_VERSION)
|
||||||
if [[ ${T[0]} == *+* ]]
|
if [[ ${T[0]} == *+* ]]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in a new issue