diff options
author | n_hibma <n_hibma@FreeBSD.org> | 2009-06-25 13:15:20 +0000 |
---|---|---|
committer | n_hibma <n_hibma@FreeBSD.org> | 2009-06-25 13:15:20 +0000 |
commit | fbabb378d7fee4e047ebb807821854591a523e76 (patch) | |
tree | af214c921a138da1ea85aee05a14ce12d37ee9e8 /tools | |
parent | 28121c52ac4c22fa1d8539c179f2f4e34f7b35df (diff) | |
download | FreeBSD-src-fbabb378d7fee4e047ebb807821854591a523e76.zip FreeBSD-src-fbabb378d7fee4e047ebb807821854591a523e76.tar.gz |
- 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)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/nanobsd/nanobsd.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/tools/nanobsd/nanobsd.sh b/tools/tools/nanobsd/nanobsd.sh index 089d0b2..d476ff8 100644 --- a/tools/tools/nanobsd/nanobsd.sh +++ b/tools/tools/nanobsd/nanobsd.sh @@ -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 |