svn commit: r271968 - head/usr.bin/mkimg/tests

Marcel Moolenaar marcel at FreeBSD.org
Mon Sep 22 15:27:24 UTC 2014


Author: marcel
Date: Mon Sep 22 15:27:23 2014
New Revision: 271968
URL: http://svnweb.freebsd.org/changeset/base/271968

Log:
  Don't echo '# $FreeBSD$' as the first line into the .uu file.  Keyword
  substitution applies to this file, including the echo command. Avoid
  the match (and substitution) by breaking the string up into 3 parts.

Modified:
  head/usr.bin/mkimg/tests/mkimg.sh

Modified: head/usr.bin/mkimg/tests/mkimg.sh
==============================================================================
--- head/usr.bin/mkimg/tests/mkimg.sh	Mon Sep 22 15:22:57 2014	(r271967)
+++ head/usr.bin/mkimg/tests/mkimg.sh	Mon Sep 22 15:27:23 2014	(r271968)
@@ -91,7 +91,8 @@ mkimg_test()
     hexdump -C $image > $result
     baseline=`atf_get_srcdir`/$image
     if test "x$mkimg_update_baseline" = "xyes"; then
-	echo '# $FreeBSD$' > $image.gz.uu
+	# Prevent keyword expansion when writing the keyword.
+	(echo -n '# $'; echo -n FreeBSD; echo '$') > $image.gz.uu
 	gzip -c $result | uuencode $image.gz >> $image.gz.uu
 	rm $image $result _tmp-*
     else


More information about the svn-src-all mailing list