Fixed special requirement for antiX id, hopefully distros won't do this type of random file generation and content, a

single string in the distro id is what they should have, ie: sidux-version, debian_version, not multiple lines
This commit is contained in:
inxi-svn 2008-10-31 03:07:52 +00:00
parent 14c7150e77
commit 6253441bc3

11
inxi
View file

@ -1,7 +1,7 @@
#!/bin/bash
########################################################################
#### Script Name: inxi
#### version: 0.2.10
#### version: 0.2.12
#### Date: October 30 2008
########################################################################
#### inxi is a fork of infobash, the original bash sys info script by locsmif
@ -487,10 +487,13 @@ show_options()
## print out version information for -V/--version
print_version_info()
{
print_screen_output "InfoBash, the universal, portable, system info script for irc."
print_screen_output "inxi, the universal, portable, system info script for irc."
print_screen_output "Tested with Irssi, Xchat, Konversation, BitchX, KSirc, ircII,"
print_screen_output "Gaim/Pidgin, Weechat, KVIrc and Kopete."
print_screen_output ""
print_screen_output "This script is a fork of Infobash:"
print_screen_output "Copyright (C) 2005-2007 Michiel de Boer a.k.a. locsmif <inxi@rebelhomicide.demon.nl>"
print_screen_output "Copyright (C) 2008 Scott Rogers, Harald Hope"
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"
@ -884,6 +887,10 @@ get_distro_data()
fi
if [ -n "$distro_file" -a -s /etc/$distro_file -a " $DISTROS_BLIST " != *" $distro_file "* ];then
distro=$( remove_erroneous_chars "/etc/$distro_file" )
# this is necessary because antiX doesn't use version/release in its distro id file name
# so the glob tests fail. I expect those tests will need to be redone at some point to avoid this
elif [ -e /etc/antiX ];then
distro="$( egrep -oi 'antix.*\.iso' <<< $( remove_erroneous_chars '/etc/antiX' ) | sed 's/\.iso//' )"
else
# Debian pure should fall through here
distro_file="issue"