Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Improve formatting of column-aligned output, as discussed on...
details: https://anonhg.NetBSD.org/src/rev/b6ab562a2018
branches: trunk
changeset: 757305:b6ab562a2018
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Tue Aug 24 13:35:32 2010 +0000
description:
Improve formatting of column-aligned output, as discussed on current-users.
diffstat:
build.sh | 52 ++++++++++++++++++++++++++++++++++++----------------
1 files changed, 36 insertions(+), 16 deletions(-)
diffs (116 lines):
diff -r ded9c5e8c3b3 -r b6ab562a2018 build.sh
--- a/build.sh Tue Aug 24 13:19:04 2010 +0000
+++ b/build.sh Tue Aug 24 13:35:32 2010 +0000
@@ -1,5 +1,5 @@
#! /usr/bin/env sh
-# $NetBSD: build.sh,v 1.237 2010/06/17 08:19:02 pooka Exp $
+# $NetBSD: build.sh,v 1.238 2010/08/24 13:35:32 pgoyette Exp $
#
# Copyright (c) 2001-2009 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -63,6 +63,27 @@
${runcmd} echo "===> $@" | tee -a "${results}"
}
+statusmsg2()
+{
+ msg="${1}"
+ shift
+ case ${msg} in
+ ????????????????*) ;;
+ ??????????*) msg="${msg} ";;
+ ?????*) msg="${msg} ";;
+ *) msg="${msg} ";;
+ esac
+ case ${msg} in
+ ?????????????????????*) ;;
+ ????????????????????) msg="${msg} ";;
+ ???????????????????) msg="${msg} ";;
+ ??????????????????) msg="${msg} ";;
+ ?????????????????) msg="${msg} ";;
+ ????????????????) msg="${msg} ";;
+ esac
+ statusmsg "${msg}$@"
+}
+
warning()
{
statusmsg "Warning: $@"
@@ -1219,7 +1240,7 @@
fi
eval ${var}=\"\${newval}\"
eval export ${var}
- statusmsg "${var} path: ${newval}"
+ statusmsg2 "${var} path:" "${newval}"
done
# RELEASEMACHINEDIR is just a subdir name, e.g. "i386".
@@ -1361,7 +1382,7 @@
eval cat <<EOF ${makewrapout}
#! ${HOST_SH}
# Set proper variables to allow easy "make" building of a NetBSD subtree.
-# Generated from: \$NetBSD: build.sh,v 1.237 2010/06/17 08:19:02 pooka Exp $
+# Generated from: \$NetBSD: build.sh,v 1.238 2010/08/24 13:35:32 pgoyette Exp $
# with these arguments: ${_args}
#
@@ -1386,8 +1407,7 @@
EOF
[ "${runcmd}" = "echo" ] && echo EOF
${runcmd} chmod +x "${makewrapper}"
- statusmsg "makewrapper: ${makewrapper}"
- statusmsg "Updated ${makewrapper}"
+ statusmsg2 "Updated makewrapper:" "${makewrapper}"
}
make_in_dir()
@@ -1456,8 +1476,8 @@
buildkernelwarned=true
fi
getkernelconf $1
- statusmsg "Building kernel: ${kernelconf}"
- statusmsg "Build directory: ${kernelbuildpath}"
+ statusmsg2 "Building kernel:" "${kernelconf}"
+ statusmsg2 "Build directory:" "${kernelbuildpath}"
${runcmd} mkdir -p "${kernelbuildpath}" ||
bomb "Cannot mkdir: ${kernelbuildpath}"
if [ "${MKUPDATE}" = "no" ]; then
@@ -1491,7 +1511,7 @@
builtkern="${kernelbuildpath}/${kern}"
[ -f "${builtkern}" ] || continue
releasekern="${kernelreldir}/${kern}-${kernelconfname}.gz"
- statusmsg "Kernel copy: ${releasekern}"
+ statusmsg2 "Kernel copy:" "${releasekern}"
if [ "${runcmd}" = "echo" ]; then
echo "gzip -c -9 < ${builtkern} > ${releasekern}"
else
@@ -1635,13 +1655,13 @@
sanitycheck
build_start=$(date)
- statusmsg "${progname} command: $0 $@"
- statusmsg "${progname} started: ${build_start}"
- statusmsg "NetBSD version: ${DISTRIBVER}"
- statusmsg "MACHINE: ${MACHINE}"
- statusmsg "MACHINE_ARCH: ${MACHINE_ARCH}"
- statusmsg "Build platform: ${uname_s} ${uname_r} ${uname_m}"
- statusmsg "HOST_SH: ${HOST_SH}"
+ statusmsg2 "${progname} command:" "$0 $@"
+ statusmsg2 "${progname} started:" "${build_start}"
+ statusmsg2 "NetBSD version:" "${DISTRIBVER}"
+ statusmsg2 "MACHINE:" "${MACHINE}"
+ statusmsg2 "MACHINE_ARCH:" "${MACHINE_ARCH}"
+ statusmsg2 "Build platform:" "${uname_s} ${uname_r} ${uname_m}"
+ statusmsg2 "HOST_SH:" "${HOST_SH}"
rebuildmake
validatemakeparams
@@ -1716,7 +1736,7 @@
esac
done
- statusmsg "${progname} ended: $(date)"
+ statusmsg2 "${progname} ended:" "$(date)"
if [ -s "${results}" ]; then
echo "===> Summary of results:"
sed -e 's/^===>//;s/^/ /' "${results}"
Home |
Main Index |
Thread Index |
Old Index