mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
tweaked output for dynamic partitoin output
This commit is contained in:
parent
ce33ac4884
commit
8ac17fd729
27
inxi
27
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 0.7.1-b1-t2
|
#### version: 0.7.1-b1-t3
|
||||||
#### Date: December 3 2008
|
#### Date: December 3 2008
|
||||||
########################################################################
|
########################################################################
|
||||||
#### inxi is a fork of infobash 3.02, the original bash sys info script by locsmif
|
#### inxi is a fork of infobash 3.02, the original bash sys info script by locsmif
|
||||||
|
@ -2620,7 +2620,8 @@ print_networking_ip_data()
|
||||||
print_partition_data()
|
print_partition_data()
|
||||||
{
|
{
|
||||||
local a_partition_working='' partition_used='' swap='' partition_data='' partition_data_2=''
|
local a_partition_working='' partition_used='' swap='' partition_data='' partition_data_2=''
|
||||||
local partition_data_3='' partition_data_4='' partition_data_5='' counter=1 line_max=150
|
local partition_data_3='' partition_data_4='' partition_data_5='' partition_data_6=''
|
||||||
|
local partition_data_7='' counter=1 line_max=150
|
||||||
|
|
||||||
# set A_PARTITION_DATA
|
# set A_PARTITION_DATA
|
||||||
get_partition_data
|
get_partition_data
|
||||||
|
@ -2670,8 +2671,20 @@ print_partition_data()
|
||||||
counter=5
|
counter=5
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
5)
|
||||||
partition_data_5="$partition_data_5${C1}ID:${C2}$swap${a_partition_working[0]} ${C1}size:${C2} ${a_partition_working[1]}$partition_used "
|
partition_data_5="$partition_data_5${C1}ID:${C2}$swap${a_partition_working[0]} ${C1}size:${C2} ${a_partition_working[1]}$partition_used "
|
||||||
|
if [[ $( wc -c <<< $partition_data_5 ) -gt $line_max ]];then
|
||||||
|
counter=6
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
6)
|
||||||
|
partition_data_6="$partition_data_6${C1}ID:${C2}$swap${a_partition_working[0]} ${C1}size:${C2} ${a_partition_working[1]}$partition_used "
|
||||||
|
if [[ $( wc -c <<< $partition_data_6 ) -gt $line_max ]];then
|
||||||
|
counter=7
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
partition_data_7="$partition_data_7${C1}ID:${C2}$swap${a_partition_working[0]} ${C1}size:${C2} ${a_partition_working[1]}$partition_used "
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
@ -2694,6 +2707,14 @@ print_partition_data()
|
||||||
partition_data_5=$( create_print_line " " "$partition_data_5" )
|
partition_data_5=$( create_print_line " " "$partition_data_5" )
|
||||||
print_screen_output "$partition_data_5"
|
print_screen_output "$partition_data_5"
|
||||||
fi
|
fi
|
||||||
|
if [[ -n $partition_data_6 ]];then
|
||||||
|
partition_data_6=$( create_print_line " " "$partition_data_6" )
|
||||||
|
print_screen_output "$partition_data_6"
|
||||||
|
fi
|
||||||
|
if [[ -n $partition_data_7 ]];then
|
||||||
|
partition_data_7=$( create_print_line " " "$partition_data_7" )
|
||||||
|
print_screen_output "$partition_data_7"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
print_system_data()
|
print_system_data()
|
||||||
|
|
Loading…
Reference in a new issue