mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
added finch to trunk, reordered case list
This commit is contained in:
parent
313d023c01
commit
58b3c54d61
128
inxi
128
inxi
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 1.0.15
|
#### version: 1.0.16
|
||||||
#### Date: 28 May 2009
|
#### Date: 6 June 2009
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
########################################################################
|
########################################################################
|
||||||
|
@ -1258,6 +1258,46 @@ get_start_client()
|
||||||
# replacing loose detection with tight detection, bugs will be handled with app names
|
# replacing loose detection with tight detection, bugs will be handled with app names
|
||||||
# as they appear.
|
# as they appear.
|
||||||
case $app_working_name in
|
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)
|
irssi-text|irssi)
|
||||||
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 {
|
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 {
|
||||||
print $2
|
print $2
|
||||||
|
@ -1310,45 +1350,27 @@ get_start_client()
|
||||||
fi
|
fi
|
||||||
IRC_CLIENT="Konversation"
|
IRC_CLIENT="Konversation"
|
||||||
;;
|
;;
|
||||||
xchat-gnome)
|
kopete)
|
||||||
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 {
|
IRC_CLIENT_VERSION=" $( kopete -v | gawk '
|
||||||
|
/Kopete:/ {
|
||||||
print $2
|
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
|
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
|
exit
|
||||||
}' )"
|
}' )"
|
||||||
IRC_CLIENT="BitchX"
|
IRC_CLIENT="KVIrc"
|
||||||
;;
|
|
||||||
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"
|
|
||||||
;;
|
;;
|
||||||
pidgin)
|
pidgin)
|
||||||
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 {
|
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_VERSION=" $( $irc_client_path -v ) "
|
||||||
IRC_CLIENT="Weechat"
|
IRC_CLIENT="Weechat"
|
||||||
;;
|
;;
|
||||||
kvirc)
|
xchat-gnome)
|
||||||
IRC_CLIENT_VERSION=" $( $irc_client_path -v 2>&1 | gawk '{
|
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 {
|
||||||
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:/ {
|
|
||||||
print $2
|
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)
|
perl*|ksirc|dsirc)
|
||||||
unset IRC_CLIENT_VERSION
|
unset IRC_CLIENT_VERSION
|
||||||
# KSirc is one of the possibilities now. KSirc is a wrapper around dsirc, a perl client
|
# 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"
|
IRC_CLIENT="Unknown Perl client"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
bash|dash|sh)
|
# then unset, set unknown data
|
||||||
unset IRC_CLIENT_VERSION
|
|
||||||
IRC_CLIENT="Shell wrapper"
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
IRC_CLIENT="Unknown : ${irc_client_path##*/}"
|
IRC_CLIENT="Unknown : ${irc_client_path##*/}"
|
||||||
unset IRC_CLIENT_VERSION
|
unset IRC_CLIENT_VERSION
|
||||||
|
|
Loading…
Reference in a new issue