From 0ae3be652a5b724590c49b18552944ecb521fe3f Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Mon, 12 Oct 2009 22:51:04 +0000 Subject: [PATCH] bug fix, forgot to print file name contents on that iteration --- inxi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/inxi b/inxi index 563b6b2..fbbf10b 100755 --- a/inxi +++ b/inxi @@ -4289,7 +4289,7 @@ print_partition_data() print_repo_data() { local repo_count=0 repo_line='' file_name='' file_content='' file_name_holder='' - local repo_full='' + local repo_full='' b_print_next_line='false' get_repo_data @@ -4304,8 +4304,10 @@ print_repo_data() if [[ $file_name != $file_name_holder ]];then repo_full="${C1}Contents of sources file:${C2} $file_name" file_name_holder=$file_name + b_print_next_line='true' else repo_full="$file_content" + b_print_next_line='false' fi # first line print Repos: if [[ $repo_count -eq 1 ]];then @@ -4314,6 +4316,11 @@ print_repo_data() repo_full=$( create_print_line " " "$repo_full" ) fi print_screen_output "$repo_full" + # this prints the content of the file as well as the file name + if [[ $b_print_next_line == 'true' ]];then + repo_full=$( create_print_line " " "$file_content" ) + print_screen_output "$repo_full" + fi done <<< "$REPO_DATA" else repo_full=$( create_print_line "Repos:" "${C1}Error:${C2} $SCRIPT_NAME does not support this feature for your distro yet." )