(change version)

quassel support added, 3 cases, for quassel, quasselclient, and quassel monolithic (unused now))

Also expanded all the gawk in that section to make it more consistent.
This commit is contained in:
inxi-svn 2009-03-13 22:39:49 +00:00
parent 70b4e1fb5b
commit bfb73bf0b6

72
inxi
View file

@ -1,8 +1,8 @@
#!/bin/bash
########################################################################
#### Script Name: inxi
#### version: 1.0.6
#### Date: 1 March 2009
#### version: 1.0.7
#### Date: 13 March 2009
########################################################################
#### SPECIAL THANKS
########################################################################
@ -1037,7 +1037,7 @@ print_version_info()
print_screen_output "This script is a fork of Infobash 3.02, which is:"
print_screen_output "Copyright (C) 2005-2007 Michiel de Boer a.k.a. locsmif"
print_screen_output "Subsequent changes and modifications (after Infobash 3.02) are:"
print_screen_output "Copyright (C) 2008 Scott Rogers, Harald Hope, aka trash80 & h2"
print_screen_output "Copyright (C) 2008-9 Scott Rogers, Harald Hope, aka trash80 & h2"
print_screen_output ""
print_screen_output "This program is free software; you can redistribute it and/or modify"
print_screen_output "it under the terms of the GNU General Public License as published by"
@ -1086,7 +1086,9 @@ get_start_client()
# as they appear.
case $app_working_name in
irssi-text|irssi)
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 { print $2 }' )"
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 {
print $2
}' )"
IRC_CLIENT="Irssi"
;;
konversation)
@ -1121,8 +1123,7 @@ get_start_client()
T2="${T[0]}"
fi
# Remove any dots except the first, and make sure there are no trailing zeroes,
T2=$( echo "$T2" | gawk '
{
T2=$( echo "$T2" | gawk '{
sub(/\./, " ")
gsub(/\./, "")
sub(/ /, ".")
@ -1137,11 +1138,15 @@ get_start_client()
IRC_CLIENT="Konversation"
;;
xchat-gnome)
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 { print $2 }' )"
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 {
print $2
}' )"
IRC_CLIENT="X-Chat-Gnome"
;;
xchat)
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 { print $2 }' )"
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 {
print $2
}' )"
IRC_CLIENT="X-Chat"
;;
bitchx)
@ -1161,25 +1166,66 @@ get_start_client()
IRC_CLIENT="BitchX"
;;
ircii)
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 { print $3 }' )"
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_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 {
print $2
}' )"
IRC_CLIENT="Gaim"
;;
pidgin)
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 { print $2 }' )"
IRC_CLIENT_VERSION=" $( $irc_client_path -v | gawk 'NR == 1 {
print $2
}' )"
IRC_CLIENT="Pidgin"
;;
quassel*)
# sample: quassel -v
# Qt: 4.5.0
# KDE: 4.2.65 (KDE 4.2.65 (KDE 4.3 >= 20090226))
# Quassel IRC: v0.4.0 [+60] (git-22effe5)
# note: early < 0.4.1 quassels do not have -v
IRC_CLIENT_VERSION=" $( $irc_client_path -v 2>/dev/null | gawk -F ': ' '
BEGIN {
IGNORECASE=1
clientVersion=""
}
/Quassel IRC/ {
clientVersion = $2
}
END {
# this handles pre 0.4.1 cases with no -v
if ( clientVersion == "" ) {
clientVersion = "(pre v0.4.1)"
}
print clientVersion
}' )"
# now handle primary, client, and core. quasselcore doesn't actually
# handle scripts with exec, but it's here just to be complete
case $app_working_name in
quassel)
IRC_CLIENT="Quassel [M]"
;;
quasselclient)
IRC_CLIENT="Quassel"
;;
quasselcore)
IRC_CLIENT="Quassel (core)"
;;
esac
;;
weechat-curses)
IRC_CLIENT_VERSION=" $( $irc_client_path -v) "
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) {
if ( i == NF ) {
print $i
}
else {