summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-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=$?