sb-disk: decrease output length
This commit is contained in:
parent
e63fd0fbe4
commit
f32efeaee1
1 changed files with 9 additions and 3 deletions
|
@ -7,9 +7,15 @@ types=${SB_DISK_FS:-ext2,ext3,ext4,xfs,btrfs,vfat}
|
|||
first=true
|
||||
for mnt in $(findmnt -Py -t "$types"); do
|
||||
eval "$mnt"
|
||||
[ "$TARGET" = "/var/lib/docker" ] && break
|
||||
$first || printf " | "
|
||||
printf "%b" "${TARGET}: $(df -h "$TARGET" | awk ' /[0-9]/ {print $3 "/" $2}')"
|
||||
case "$TARGET" in
|
||||
/var/lib/docker) break ;;
|
||||
/) icon="" ;;
|
||||
/home) icon="" ;;
|
||||
/boot*) icon="" ;;
|
||||
*) icon="" ;;
|
||||
esac
|
||||
$first || printf " "
|
||||
echo "${icon} $(df -h "$TARGET" | awk ' /[0-9]/ {print $3 "/" $2}')"
|
||||
first=false
|
||||
done
|
||||
printf "\n"
|
||||
|
|
Loading…
Add table
Reference in a new issue