Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Sep 2014 15:27:24 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r271968 - head/usr.bin/mkimg/tests
Message-ID:  <201409221527.s8MFRO6r052078@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409221527.s8MFRO6r052078>