bug fix, forgot to print file name contents on that iteration

This commit is contained in:
inxi-svn 2009-10-12 22:51:04 +00:00
parent 747a8da328
commit 0ae3be652a

9
inxi
View file

@ -4289,7 +4289,7 @@ print_partition_data()
print_repo_data() print_repo_data()
{ {
local repo_count=0 repo_line='' file_name='' file_content='' file_name_holder='' 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 get_repo_data
@ -4304,8 +4304,10 @@ print_repo_data()
if [[ $file_name != $file_name_holder ]];then if [[ $file_name != $file_name_holder ]];then
repo_full="${C1}Contents of sources file:${C2} $file_name" repo_full="${C1}Contents of sources file:${C2} $file_name"
file_name_holder=$file_name file_name_holder=$file_name
b_print_next_line='true'
else else
repo_full="$file_content" repo_full="$file_content"
b_print_next_line='false'
fi fi
# first line print Repos: # first line print Repos:
if [[ $repo_count -eq 1 ]];then if [[ $repo_count -eq 1 ]];then
@ -4314,6 +4316,11 @@ print_repo_data()
repo_full=$( create_print_line " " "$repo_full" ) repo_full=$( create_print_line " " "$repo_full" )
fi fi
print_screen_output "$repo_full" 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" done <<< "$REPO_DATA"
else else
repo_full=$( create_print_line "Repos:" "${C1}Error:${C2} $SCRIPT_NAME does not support this feature for your distro yet." ) repo_full=$( create_print_line "Repos:" "${C1}Error:${C2} $SCRIPT_NAME does not support this feature for your distro yet." )