From d7c3cc41397ca858f91f14480a26b22fb171f01c Mon Sep 17 00:00:00 2001 From: HDF Tester Date: Thu, 8 Mar 2007 15:50:11 -0500 Subject: [svn-r13480] feature Show disk usage at different stage of the snapshot processes so that we know how much disk are needed in different stage. (This still does not know how big disk usage during make check process since many temporary files are deleted right after the tests finish.) Tested platform: Kagiso. --- bin/snapshot | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/bin/snapshot b/bin/snapshot index c19e62e..5d5c4d6 100755 --- a/bin/snapshot +++ b/bin/snapshot @@ -31,6 +31,14 @@ EXIT_BANNER() TIMESTAMP "Exit $PROGNAME with status=$?" } +# Show current total disk usage. +DISKUSAGE() +{ + du -ks | \ + ( read x y; echo "Disk Usage=$x KB" ) +} + + # MAIN # SGI /bin/sh replaces $0 as function name if used in a function. # Set the name here to avoid that ambiguity and better style too. @@ -391,15 +399,15 @@ if [ "$cmd" = "all" -o -n "$cmdtest" -o -n "$cmddiff" ]; then TIMESTAMP "configure" && \ ${srcdir:+${CURRENT}/}${CONFIGURE} && \ TIMESTAMP "make" && \ - ${MAKE} && \ + ${MAKE} && DISKUSAGE \ TIMESTAMP ${CHECKVAL} && \ - ${MAKE} ${CHECKVAL} && \ + ${MAKE} ${CHECKVAL} && DISKUSAGE \ TIMESTAMP "install" && \ - ${MAKE} install-all && \ + ${MAKE} install-all && DISKUSAGE \ TIMESTAMP "check-install" && \ - ${MAKE} check-install && \ + ${MAKE} check-install && DISKUSAGE \ TIMESTAMP "uninstall" && \ - ${MAKE} uninstall-all); then + ${MAKE} uninstall-all) && DISKUSAGE ; then : else errcode=$? -- cgit v0.12