Author: n_hibma Date: Thu Jun 25 13:15:20 2009 New Revision: 194958 URL: http://svn.freebsd.org/changeset/base/194958
Log: - Make pprint print through fd 3, so it can be used in customisation functions to print something to the screen. - Prefix each line with the running time (bikeshed). Submitted by: Rick van der Zwet (Wireless Leiden) Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- head/tools/tools/nanobsd/nanobsd.sh Thu Jun 25 13:08:02 2009 (r194957) +++ head/tools/tools/nanobsd/nanobsd.sh Thu Jun 25 13:15:20 2009 (r194958) @@ -664,7 +664,8 @@ late_customize_cmd () { # Print $2 at level $1. pprint() { if [ "$1" -le $PPLEVEL ]; then - printf "%.${1}s %s\n" "#####" "$2" + runtime=$(( `date +%s` - $NANO_STARTTIME )) + printf "%s %.${1}s %s\n" "`date -u -r $runtime +%H:%M:%S`" "#####" "$2" 1>&3 fi } @@ -806,6 +807,10 @@ export NANO_BOOTLOADER ####################################################################### # And then it is as simple as that... +# File descriptor 3 is used for logging output, see pprint +exec 3>&1 + +NANO_STARTTIME=`date +%s` pprint 1 "NanoBSD image ${NANO_NAME} build starting" if $do_world ; then _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"