cleanup of code

This commit is contained in:
inxi-svn 2009-10-12 23:05:26 +00:00
parent 0f35a6b1fa
commit 3c8e84fb69

7
inxi
View file

@ -4300,13 +4300,15 @@ print_repo_data()
(( repo_count++ )) (( repo_count++ ))
file_name=$( cut -d ':' -f 1 <<< $repo_line ) file_name=$( cut -d ':' -f 1 <<< $repo_line )
file_content=$( cut -d ':' -f 2-6 <<< $repo_line ) file_content=$( cut -d ':' -f 2-6 <<< $repo_line )
# this will dump unwanted white space line starters
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 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' b_print_next_line='true'
else else
repo_full=$( echo $file_content ) # this will dump unwanted white space line starters repo_full=$file_content
fi fi
# first line print Repos: # first line print Repos:
if [[ $repo_count -eq 1 ]];then if [[ $repo_count -eq 1 ]];then
@ -4317,8 +4319,7 @@ print_repo_data()
print_screen_output "$repo_full" print_screen_output "$repo_full"
# this prints the content of the file as well as the file name # this prints the content of the file as well as the file name
if [[ $b_print_next_line == 'true' ]];then if [[ $b_print_next_line == 'true' ]];then
repo_full=$( echo $file_content ) repo_full=$( create_print_line " " "$file_content" )
repo_full=$( create_print_line " " "$repo_full" )
print_screen_output "$repo_full" print_screen_output "$repo_full"
b_print_next_line='false' b_print_next_line='false'
fi fi