From 297af994c0061fb8b1fafc49149d678e55e1c1a5 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Mon, 12 Oct 2009 23:14:29 +0000 Subject: [PATCH] (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. --- inxi | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/inxi b/inxi index b22273b..9ea3378 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 1.2.0 +#### version: 1.2.1 #### Date: October 12 2009 ######################################################################## #### SPECIAL THANKS @@ -155,6 +155,7 @@ COLOR_SCHEME_SET='' IRC_CLIENT='' IRC_CLIENT_VERSION='' REPO_DATA='' +REPO_FILE_ID='' ### primary data array holders ## usage: 'A_' A_AUDIO_DATA='' @@ -3097,6 +3098,7 @@ get_repo_data() { if [[ -f /etc/apt/sources.list ]];then REPO_DATA="$( grep -Esv '(^$|^[[:space:]]*#)' /etc/apt/sources.list /etc/apt/sources.list.d/*.list )" + REPO_FILE_ID='sources' fi } @@ -4304,7 +4306,7 @@ print_repo_data() file_content=$( echo $file_content ) # check file name, if different, update the holder for print out 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 b_print_next_line='true' else