mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
(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:
parent
70b4e1fb5b
commit
bfb73bf0b6
68
inxi
68
inxi
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 1.0.6
|
#### version: 1.0.7
|
||||||
#### Date: 1 March 2009
|
#### Date: 13 March 2009
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### 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 "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 "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 "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 ""
|
||||||
print_screen_output "This program is free software; you can redistribute it and/or modify"
|
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"
|
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.
|
# as they appear.
|
||||||
case $app_working_name in
|
case $app_working_name in
|
||||||
irssi-text|irssi)
|
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"
|
IRC_CLIENT="Irssi"
|
||||||
;;
|
;;
|
||||||
konversation)
|
konversation)
|
||||||
|
@ -1121,8 +1123,7 @@ get_start_client()
|
||||||
T2="${T[0]}"
|
T2="${T[0]}"
|
||||||
fi
|
fi
|
||||||
# Remove any dots except the first, and make sure there are no trailing zeroes,
|
# Remove any dots except the first, and make sure there are no trailing zeroes,
|
||||||
T2=$( echo "$T2" | gawk '
|
T2=$( echo "$T2" | gawk '{
|
||||||
{
|
|
||||||
sub(/\./, " ")
|
sub(/\./, " ")
|
||||||
gsub(/\./, "")
|
gsub(/\./, "")
|
||||||
sub(/ /, ".")
|
sub(/ /, ".")
|
||||||
|
@ -1137,11 +1138,15 @@ get_start_client()
|
||||||
IRC_CLIENT="Konversation"
|
IRC_CLIENT="Konversation"
|
||||||
;;
|
;;
|
||||||
xchat-gnome)
|
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"
|
IRC_CLIENT="X-Chat-Gnome"
|
||||||
;;
|
;;
|
||||||
xchat)
|
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"
|
IRC_CLIENT="X-Chat"
|
||||||
;;
|
;;
|
||||||
bitchx)
|
bitchx)
|
||||||
|
@ -1161,17 +1166,58 @@ get_start_client()
|
||||||
IRC_CLIENT="BitchX"
|
IRC_CLIENT="BitchX"
|
||||||
;;
|
;;
|
||||||
ircii)
|
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"
|
IRC_CLIENT="ircII"
|
||||||
;;
|
;;
|
||||||
gaim)
|
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"
|
IRC_CLIENT="Gaim"
|
||||||
;;
|
;;
|
||||||
pidgin)
|
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"
|
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)
|
weechat-curses)
|
||||||
IRC_CLIENT_VERSION=" $( $irc_client_path -v ) "
|
IRC_CLIENT_VERSION=" $( $irc_client_path -v ) "
|
||||||
IRC_CLIENT="Weechat"
|
IRC_CLIENT="Weechat"
|
||||||
|
|
Loading…
Reference in a new issue