branch one, final line widths

This commit is contained in:
inxi-svn 2014-04-01 20:54:12 +00:00
parent 40a74416cb
commit 7cdef2526f

50
inxi
View file

@ -3,7 +3,7 @@
#### Script Name: inxi #### Script Name: inxi
#### Version: 2.1.15 #### Version: 2.1.15
#### Date: 2014-04-01 #### Date: 2014-04-01
#### Patch Number: 01-b1 #### Patch Number: 02-b1
######################################################################## ########################################################################
#### SPECIAL THANKS #### SPECIAL THANKS
######################################################################## ########################################################################
@ -10550,7 +10550,7 @@ print_optical_drive_data()
eval $LOGFS eval $LOGFS
local a_drives='' drive_data='' counter='' local a_drives='' drive_data='' counter=''
local drive_id='' drive_links='' vendor='' speed='' multisession='' mcn='' audio='' local drive_id='' drive_links='' vendor='' speed='' multisession='' mcn='' audio=''
local dvd='' state='' rw_support='' rev='' separator='' drive_string='' local dvd='' state='' rw_support='' rev='' separator='' drive_string='' part_2_data=''
get_optical_drive_data get_optical_drive_data
# 0 - true dev path, ie, sr0, hdc # 0 - true dev path, ie, sr0, hdc
# 1 - dev links to true path # 1 - dev links to true path
@ -10613,12 +10613,41 @@ print_optical_drive_data()
fi fi
rev="${C1}rev$SEP3${C2} $rev " rev="${C1}rev$SEP3${C2} $rev "
fi fi
drive_string="$drive_id ${C1}model$SEP3${C2} $vendor$rev ${C1}dev-links$SEP3${C2} $drive_links" drive_string="$drive_id ${C1}model$SEP3${C2} $vendor "
part_2_data="$rev${C1}dev-links$SEP3${C2} $drive_links"
fi fi
drive_data="${C1}Optical${counter}$SEP3${C2} $drive_string" drive_data="${C1}Optical${counter}$SEP3${C2} $drive_string"
if [[ $( calculate_line_length "$drive_data$part_2_data" ) -lt $COLS_INNER ]];then
drive_data=$( create_print_line "$Line_Starter" "$drive_data$part_2_data${CN}" )
print_screen_output "$drive_data"
Line_Starter=' '
drive_data=''
part_2_data=''
else
if [[ $( calculate_line_length "$drive_data" ) -gt $COLS_INNER ]];then
drive_data=$( create_print_line "$Line_Starter" "$drive_data${CN}" ) drive_data=$( create_print_line "$Line_Starter" "$drive_data${CN}" )
print_screen_output "$drive_data" print_screen_output "$drive_data"
Line_Starter=' ' Line_Starter=' '
drive_data=''
fi
if [[ $( calculate_line_length "$drive_data$part_2_data" ) -lt $COLS_INNER ]];then
drive_data=$( create_print_line "$Line_Starter" "$drive_data$part_2_data${CN}" )
print_screen_output "$drive_data"
Line_Starter=' '
part_2_data=''
drive_data=''
else
drive_data=$( create_print_line "$Line_Starter" "$drive_data${CN}" )
print_screen_output "$drive_data"
drive_data=''
Line_Starter=' '
drive_data=$( create_print_line "$Line_Starter" "$part_2_data${CN}" )
print_screen_output "$drive_data"
Line_Starter=' '
part_2_data=''
fi
fi
# 5 - speed # 5 - speed
# 6 - multisession support # 6 - multisession support
# 7 - MCN support # 7 - MCN support
@ -10685,10 +10714,19 @@ print_optical_drive_data()
if [[ -z $rw_support ]];then if [[ -z $rw_support ]];then
rw_support='none' rw_support='none'
fi fi
drive_data="${C1}Features: speed$SEP3${C2} $speed$multisession "
drive_data="${C1}Features: speed$SEP3${C2} $speed$multisession$audio ${C1}dvd$SEP3${C2} $dvd ${C1}rw$SEP3${C2} $rw_support$state" part_2_data="$audio ${C1}dvd$SEP3${C2} $dvd ${C1}rw$SEP3${C2} $rw_support$state"
drive_data=$( create_print_line "$Line_Starter" "$drive_data${CN}" ) if [[ $( calculate_line_length "$drive_data$part_2_data" ) -lt $COLS_INNER ]];then
drive_data=$( create_print_line "$Line_Starter" "$drive_data$part_2_data${CN}" )
print_screen_output "$drive_data" print_screen_output "$drive_data"
Line_Starter=' '
else
drive_data=$( create_print_line "$Line_Starter" "$drive_data" )
print_screen_output "$drive_data"
drive_data=$( create_print_line "$Line_Starter" "$part_2_data${CN}" )
print_screen_output "$drive_data"
Line_Starter=' '
fi
fi fi
done done
else else