mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
branch one, final line widths
This commit is contained in:
parent
40a74416cb
commit
7cdef2526f
62
inxi
62
inxi
|
@ -3,7 +3,7 @@
|
|||
#### Script Name: inxi
|
||||
#### Version: 2.1.15
|
||||
#### Date: 2014-04-01
|
||||
#### Patch Number: 01-b1
|
||||
#### Patch Number: 02-b1
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
########################################################################
|
||||
|
@ -10550,7 +10550,7 @@ print_optical_drive_data()
|
|||
eval $LOGFS
|
||||
local a_drives='' drive_data='' counter=''
|
||||
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
|
||||
# 0 - true dev path, ie, sr0, hdc
|
||||
# 1 - dev links to true path
|
||||
|
@ -10611,14 +10611,43 @@ print_optical_drive_data()
|
|||
else
|
||||
rev='N/A'
|
||||
fi
|
||||
rev=" ${C1}rev$SEP3${C2} $rev"
|
||||
rev="${C1}rev$SEP3${C2} $rev "
|
||||
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
|
||||
drive_data="${C1}Optical${counter}$SEP3${C2} $drive_string"
|
||||
drive_data=$( create_print_line "$Line_Starter" "$drive_data${CN}" )
|
||||
print_screen_output "$drive_data"
|
||||
Line_Starter=' '
|
||||
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}" )
|
||||
print_screen_output "$drive_data"
|
||||
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
|
||||
# 6 - multisession support
|
||||
# 7 - MCN support
|
||||
|
@ -10642,7 +10671,7 @@ print_optical_drive_data()
|
|||
else
|
||||
audio='no'
|
||||
fi
|
||||
audio=" ${C1}audio$SEP3${C2} $audio"
|
||||
audio="${C1}audio$SEP3${C2} $audio "
|
||||
if [[ -z ${a_drives[6]} ]];then
|
||||
multisession='N/A'
|
||||
elif [[ ${a_drives[6]} == 1 ]];then
|
||||
|
@ -10685,10 +10714,19 @@ print_optical_drive_data()
|
|||
if [[ -z $rw_support ]];then
|
||||
rw_support='none'
|
||||
fi
|
||||
|
||||
drive_data="${C1}Features: speed$SEP3${C2} $speed$multisession$audio ${C1}dvd$SEP3${C2} $dvd ${C1}rw$SEP3${C2} $rw_support$state"
|
||||
drive_data=$( create_print_line "$Line_Starter" "$drive_data${CN}" )
|
||||
print_screen_output "$drive_data"
|
||||
drive_data="${C1}Features: speed$SEP3${C2} $speed$multisession "
|
||||
part_2_data="$audio ${C1}dvd$SEP3${C2} $dvd ${C1}rw$SEP3${C2} $rw_support$state"
|
||||
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=' '
|
||||
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
|
||||
done
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue