summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@ubuntu.com>2012-01-12 22:22:57 +0100
committerDaniel Baumann <daniel@debian.org>2012-01-12 22:22:57 +0100
commit3a75594b8c2590f7512702af390af0b5ff7bb4ea (patch)
tree68c9c1808781834d14050e3c78e675c095b89b50
parentdf0721e87ae3fa48b29a7729276637525899d75d (diff)
downloadvyos-live-build-3a75594b8c2590f7512702af390af0b5ff7bb4ea.tar.gz
vyos-live-build-3a75594b8c2590f7512702af390af0b5ff7bb4ea.zip
Print the current time before starting a command with the lb wrapper script (Closes: #630089).
-rwxr-xr-xscripts/build/lb9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/build/lb b/scripts/build/lb
index 58c1d12d5..4bb76cb56 100755
--- a/scripts/build/lb
+++ b/scripts/build/lb
@@ -44,16 +44,19 @@ case "${1}" in
if [ -x "${LB_BASE}/scripts/build/${COMMAND}" ]
then
- LB=1 exec "${LB_BASE}/scripts/build/${COMMAND}" "${@}"
+ SCRIPT="${LB_BASE}/scripts/build/${COMMAND}"
elif [ -x /usr/share/live/build/scripts/build/${COMMAND} ]
then
- LB=1 exec /usr/share/live/build/scripts/build/"${COMMAND}" "${@}"
+ SCRIPT=/usr/share/live/build/scripts/build/"${COMMAND}"
elif [ -x "$(which ${COMMAND} 2>/dev/null)" ]
then
- LB=1 exec "${COMMAND}" "${@}"
+ SCRIPT="${COMMAND}"
else
Echo_error "no such script"
exit 1
fi
+
+ Echo "[%s] %s" "$(date +'%F %T')" "${COMMAND} ${*}"
+ LB=1 exec "${SCRIPT}" "${@}"
;;
esac