added finch to trunk, reordered case list

This commit is contained in:
inxi-svn 2009-06-07 01:55:40 +00:00
parent 313d023c01
commit 58b3c54d61

128
inxi
View file

@ -1,8 +1,8 @@
#!/bin/bash
########################################################################
#### Script Name: inxi
#### version: 1.0.15
#### Date: 28 May 2009
#### version: 1.0.16
#### Date: 6 June 2009
########################################################################
#### SPECIAL THANKS
########################################################################
@ -1258,6 +1258,46 @@ get_start_client()
# replacing loose detection with tight detection, bugs will be handled with app names
# as they appear.
case $app_working_name in
# check for shell first
bash|dash|sh)
unset IRC_CLIENT_VERSION
IRC_CLIENT="Shell wrapper"
;;
# now start on irc clients, alphabetically
bitchx)
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk '
/Version/ {
a=tolower($2)
gsub(/[()]|bitchx-/,"",a)
print a
exit
}
$2 == "version" {
a=tolower($3)
sub(/bitchx-/,"",a)
print a
exit
}' )"
IRC_CLIENT="BitchX"
;;
finch)
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 {
print $2
}' )"
IRC_CLIENT="Finch"
;;
gaim)
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 {
print $2
}' )"
IRC_CLIENT="Gaim"
;;
ircii)
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 {
print $3
}' )"
IRC_CLIENT="ircII"
;;
irssi-text|irssi)
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 {
print $2
@ -1310,45 +1350,27 @@ get_start_client()
fi
IRC_CLIENT="Konversation"
;;
xchat-gnome)
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 {
kopete)
IRC_CLIENT_VERSION=" $( kopete -v | gawk '
/Kopete:/ {
print $2
}' )"
IRC_CLIENT="X-Chat-Gnome"
;;
xchat)
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 {
print $2
}' )"
IRC_CLIENT="X-Chat"
;;
bitchx)
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk '
/Version/ {
a=tolower($2)
gsub(/[()]|bitchx-/,"",a)
print a
exit
}' )"
IRC_CLIENT="Kopete"
;;
kvirc)
IRC_CLIENT_VERSION=" $( $irc_client_path -v 2>&1 | gawk '{
for ( i=2; i<=NF; i++) {
if ( i == NF ) {
print $i
}
else {
printf $i" "
}
}
$2 == "version" {
a=tolower($3)
sub(/bitchx-/,"",a)
print a
exit
}' )"
IRC_CLIENT="BitchX"
;;
ircii)
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 {
print $3
}' )"
IRC_CLIENT="ircII"
;;
gaim)
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 {
print $2
}' )"
IRC_CLIENT="Gaim"
IRC_CLIENT="KVIrc"
;;
pidgin)
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 {
@ -1395,28 +1417,19 @@ get_start_client()
IRC_CLIENT_VERSION=" $( $irc_client_path -v ) "
IRC_CLIENT="Weechat"
;;
kvirc)
IRC_CLIENT_VERSION=" $( $irc_client_path -v 2>&1 | gawk '{
for ( i=2; i<=NF; i++) {
if ( i == NF ) {
print $i
}
else {
printf $i" "
}
}
exit
}' )"
IRC_CLIENT="KVIrc"
;;
kopete)
IRC_CLIENT_VERSION=" $( kopete -v | gawk '
/Kopete:/ {
xchat-gnome)
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 {
print $2
exit
}' )"
IRC_CLIENT="Kopete"
IRC_CLIENT="X-Chat-Gnome"
;;
xchat)
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 {
print $2
}' )"
IRC_CLIENT="X-Chat"
;;
# then do some perl type searches, do this last since it's a wildcard search
perl*|ksirc|dsirc)
unset IRC_CLIENT_VERSION
# KSirc is one of the possibilities now. KSirc is a wrapper around dsirc, a perl client
@ -1447,10 +1460,7 @@ get_start_client()
IRC_CLIENT="Unknown Perl client"
fi
;;
bash|dash|sh)
unset IRC_CLIENT_VERSION
IRC_CLIENT="Shell wrapper"
;;
# then unset, set unknown data
*)
IRC_CLIENT="Unknown : ${irc_client_path##*/}"
unset IRC_CLIENT_VERSION