mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
last tweaks
This commit is contained in:
parent
ddb7fff801
commit
eb1dc02ed5
23
inxi
23
inxi
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### version: 0.7.1-b1-t4
|
||||
#### version: 0.7.1-b1-t5
|
||||
#### Date: December 3 2008
|
||||
########################################################################
|
||||
#### inxi is a fork of infobash 3.02, the original bash sys info script by locsmif
|
||||
|
@ -2621,9 +2621,9 @@ print_partition_data()
|
|||
{
|
||||
local a_partition_working='' partition_used='' swap='' partition_data='' partition_data_2=''
|
||||
local partition_data_3='' partition_data_4='' partition_data_5='' partition_data_6=''
|
||||
local partition_data_7='' counter=1 line_max=150
|
||||
local partition_data_7='' partition_data_8='' counter=1 line_max=150
|
||||
|
||||
# this handles the different irc colors strings embedded in variable data
|
||||
# this handles the different, shorter, irc colors strings embedded in variable data
|
||||
if [[ $B_RUNNING_IN_SHELL != 'true' ]];then
|
||||
line_max=130
|
||||
fi
|
||||
|
@ -2652,14 +2652,12 @@ print_partition_data()
|
|||
case $counter in
|
||||
1)
|
||||
partition_data="$partition_data${C1}ID:${C2}$swap${a_partition_working[0]} ${C1}size:${C2} ${a_partition_working[1]}$partition_used "
|
||||
# echo 1 $( wc -c <<< $partition_data )
|
||||
if [[ $( wc -c <<< $partition_data ) -gt $line_max ]];then
|
||||
counter=2
|
||||
fi
|
||||
;;
|
||||
2)
|
||||
partition_data_2="$partition_data_2${C1}ID:${C2}$swap${a_partition_working[0]} ${C1}size:${C2} ${a_partition_working[1]}$partition_used "
|
||||
# echo 2 $( wc -c <<< $partition_data_2 )
|
||||
if [[ $( wc -c <<< $partition_data_2 ) -gt $line_max ]];then
|
||||
counter=3
|
||||
fi
|
||||
|
@ -2688,14 +2686,23 @@ print_partition_data()
|
|||
counter=7
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
7)
|
||||
partition_data_7="$partition_data_7${C1}ID:${C2}$swap${a_partition_working[0]} ${C1}size:${C2} ${a_partition_working[1]}$partition_used "
|
||||
if [[ $( wc -c <<< $partition_data_7 ) -gt $line_max ]];then
|
||||
counter=8
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
partition_data_8="$partition_data_8${C1}ID:${C2}$swap${a_partition_working[0]} ${C1}size:${C2} ${a_partition_working[1]}$partition_used "
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
# create the first line
|
||||
partition_data=$( create_print_line "Partition:" "$partition_data" )
|
||||
print_screen_output "$partition_data"
|
||||
|
||||
# then the rest, if required
|
||||
if [[ -n $partition_data_2 ]];then
|
||||
partition_data_2=$( create_print_line " " "$partition_data_2" )
|
||||
print_screen_output "$partition_data_2"
|
||||
|
@ -2720,6 +2727,10 @@ print_partition_data()
|
|||
partition_data_7=$( create_print_line " " "$partition_data_7" )
|
||||
print_screen_output "$partition_data_7"
|
||||
fi
|
||||
if [[ -n $partition_data_8 ]];then
|
||||
partition_data_8=$( create_print_line " " "$partition_data_8" )
|
||||
print_screen_output "$partition_data_8"
|
||||
fi
|
||||
}
|
||||
|
||||
print_system_data()
|
||||
|
|
Loading…
Reference in a new issue