summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHDF Tester <hdftest@hdfgroup.org>2007-03-08 20:50:11 (GMT)
committerHDF Tester <hdftest@hdfgroup.org>2007-03-08 20:50:11 (GMT)
commitd7c3cc41397ca858f91f14480a26b22fb171f01c (patch)
tree6bc238ff854ce9a29165792f6a92acacf02cb776
parent7b065df1597bed977dd0f16b853cdd21e25efbdc (diff)
downloadhdf5-d7c3cc41397ca858f91f14480a26b22fb171f01c.zip
hdf5-d7c3cc41397ca858f91f14480a26b22fb171f01c.tar.gz
hdf5-d7c3cc41397ca858f91f14480a26b22fb171f01c.tar.bz2
[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.
-rwxr-xr-xbin/snapshot18
1 files 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=$?