[devscripts] 03/03: annotate-output: Fix handling of a date format that contains whitespace
James McCoy
jamessan at debian.org
Thu Oct 30 04:13:21 UTC 2014
This is an automated email from the git hooks/post-receive script.
jamessan pushed a commit to branch master
in repository devscripts.
commit 36eac04eed18f574952bd984d24db8b32f530c4f
Author: James McCoy <jamessan at debian.org>
Date: Thu Oct 30 00:15:29 2014 -0400
annotate-output: Fix handling of a date format that contains whitespace
Closes: #766180
Signed-off-by: James McCoy <jamessan at debian.org>
---
debian/changelog | 2 ++
scripts/annotate-output.sh | 8 ++++----
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index b8f8fdb..1681d09 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,8 @@ devscripts (2.14.11) UNRELEASED; urgency=medium
(Closes: #766885)
* mk-origtargz: Warn about unmatched Files-Excluded patterns. (Closes:
#766641)
+ * annotate-output: Fix handling of a date format that contains whitespace.
+ (Closes: #766180)
[ Jakub Wilk ]
* sadt:
diff --git a/scripts/annotate-output.sh b/scripts/annotate-output.sh
index 1edc238..c34cd90 100755
--- a/scripts/annotate-output.sh
+++ b/scripts/annotate-output.sh
@@ -25,10 +25,10 @@ progname=$(basename $0)
addtime ()
{
while IFS= read -r line; do
- echo "`date ${FMT}` $1: $line"
+ printf "%s %s: %s\n" "$(date "${FMT}")" "$1" "$line"
done
if [ ! -z "$line" ]; then
- echo -n "`date ${FMT}` $1: $line"
+ printf "%s %s: %s" "$(date "${FMT}")" "$1" "$line"
fi
}
@@ -78,11 +78,11 @@ mkfifo $OUT $ERR || exit 1
addtime O < $OUT &
addtime E < $ERR &
-echo "`date ${FMT}` I: Started $@"
+echo "Started $@" | addtime I
"$@" > $OUT 2> $ERR ; EXIT=$?
rm -f $OUT $ERR
wait
-echo "`date ${FMT}` I: Finished with exitcode $EXIT"
+echo "Finished with exitcode $EXIT" | addtime I
exit $EXIT
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list