(change version)

added global repo id name for printout, set in get_repo_data, this makes it forward compatible for other repo type systems than apt.
This commit is contained in:
inxi-svn 2009-10-12 23:14:29 +00:00
parent 3c011c53d5
commit 297af994c0

6
inxi
View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
######################################################################## ########################################################################
#### Script Name: inxi #### Script Name: inxi
#### version: 1.2.0 #### version: 1.2.1
#### Date: October 12 2009 #### Date: October 12 2009
######################################################################## ########################################################################
#### SPECIAL THANKS #### SPECIAL THANKS
@ -155,6 +155,7 @@ COLOR_SCHEME_SET=''
IRC_CLIENT='' IRC_CLIENT=''
IRC_CLIENT_VERSION='' IRC_CLIENT_VERSION=''
REPO_DATA='' REPO_DATA=''
REPO_FILE_ID=''
### primary data array holders ## usage: 'A_<var>' ### primary data array holders ## usage: 'A_<var>'
A_AUDIO_DATA='' A_AUDIO_DATA=''
@ -3097,6 +3098,7 @@ get_repo_data()
{ {
if [[ -f /etc/apt/sources.list ]];then if [[ -f /etc/apt/sources.list ]];then
REPO_DATA="$( grep -Esv '(^$|^[[:space:]]*#)' /etc/apt/sources.list /etc/apt/sources.list.d/*.list )" REPO_DATA="$( grep -Esv '(^$|^[[:space:]]*#)' /etc/apt/sources.list /etc/apt/sources.list.d/*.list )"
REPO_FILE_ID='sources'
fi fi
} }
@ -4304,7 +4306,7 @@ print_repo_data()
file_content=$( echo $file_content ) file_content=$( echo $file_content )
# check file name, if different, update the holder for print out # check file name, if different, update the holder for print out
if [[ $file_name != $file_name_holder ]];then if [[ $file_name != $file_name_holder ]];then
repo_full="${C1}Contents of repo file:${C2} $file_name" repo_full="${C1}Contents of $REPO_FILE_ID file:${C2} $file_name"
file_name_holder=$file_name file_name_holder=$file_name
b_print_next_line='true' b_print_next_line='true'
else else