mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +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
|
#### 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
|
||||||
|
@ -10611,14 +10611,43 @@ print_optical_drive_data()
|
||||||
else
|
else
|
||||||
rev='N/A'
|
rev='N/A'
|
||||||
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"
|
||||||
drive_data=$( create_print_line "$Line_Starter" "$drive_data${CN}" )
|
if [[ $( calculate_line_length "$drive_data$part_2_data" ) -lt $COLS_INNER ]];then
|
||||||
print_screen_output "$drive_data"
|
drive_data=$( create_print_line "$Line_Starter" "$drive_data$part_2_data${CN}" )
|
||||||
Line_Starter=' '
|
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
|
# 5 - speed
|
||||||
# 6 - multisession support
|
# 6 - multisession support
|
||||||
# 7 - MCN support
|
# 7 - MCN support
|
||||||
|
@ -10642,7 +10671,7 @@ print_optical_drive_data()
|
||||||
else
|
else
|
||||||
audio='no'
|
audio='no'
|
||||||
fi
|
fi
|
||||||
audio=" ${C1}audio$SEP3${C2} $audio"
|
audio="${C1}audio$SEP3${C2} $audio "
|
||||||
if [[ -z ${a_drives[6]} ]];then
|
if [[ -z ${a_drives[6]} ]];then
|
||||||
multisession='N/A'
|
multisession='N/A'
|
||||||
elif [[ ${a_drives[6]} == 1 ]];then
|
elif [[ ${a_drives[6]} == 1 ]];then
|
||||||
|
@ -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
|
||||||
print_screen_output "$drive_data"
|
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
|
fi
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue