diff options
author | Dave Reisner <d@falconindy.com> | 2010-01-12 18:34:05 -0500 |
---|---|---|
committer | Dave Reisner <d@falconindy.com> | 2010-01-12 18:34:05 -0500 |
commit | 827b1cd34d810b23c78ea40fc2b97dff8bf37cf6 (patch) | |
tree | 12a72fae0e5d771a47f456a4dad68cd55eb1f263 /squashfu | |
parent | 71305613bbf38816fd6f28391eae36ed029a134f (diff) | |
download | squashfu-827b1cd34d810b23c78ea40fc2b97dff8bf37cf6.tar.gz |
Add seed size and totals to usage report
Diffstat (limited to 'squashfu')
-rwxr-xr-x | squashfu | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -300,18 +300,24 @@ action_rollback () { action_report () { info "SquashFu Usage Report" + echo # Enumerate bins, sort date order, print human readable create date and size OLDIFS=$IFS;IFS='$:' - printf "%10s\t%30s\t%10s\n" "Bin" "Date Created" "Size" - debug ---------------------------------------- + printf "%10s\t%25s\t%7s\n" "Bin" "Date Created" "Size" grep -vE "^[\t ]*$" "$BINVENTORY" | sort -r -k2 -n | while read bin stamp; do - printf "%10d\t%30s\t%10s\n" $bin \ + printf "%10d\t%25s\t%7s\n" $bin \ "$(date --rfc-3339=seconds --date="1970-01-01 $stamp sec GMT")" \ "$(du -sh ${BINS_DIR}/$bin 2>/dev/null | awk '{print $1}')" done IFS=$OLDIFS + printf "%10s\t%25s\t%7s\n" "" "Incremental Total" "$(du -sh "$BINS_DIR" 2>/dev/null | awk '{print $1}')" # TODO: Print totals + echo + printf "%10s\t%25s\t%7s\n" "" "$(basename $SEED)" "$(du -h "$SEED" 2>/dev/null | awk '{print $1}')" + echo + printf "%10s\t%25s\t%7s\n" "" "Grand Total" \ + "$(du -csh "$BINS_DIR" "$SEED" 2>/dev/null | grep -E "total$" | awk '{print $1}')" } case $1 in |