changeset 29953:d3ee198c4b7a

vc-list-files: make the last-resort awk code more portable * build-aux/vc-list-files: Don't rely on awk's "sub" command. /bin/awk from OpenSolaris 11's SUNWesu version 2008.03.22.10.56 does not support it.
author Jim Meyering <meyering@redhat.com>
date Fri, 11 Jul 2008 19:32:46 +0200
parents 8ddb5699ce12
children 6c315ac54144
files ChangeLog build-aux/vc-list-files
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Jul 10 15:10:42 2008 -0600
+++ b/ChangeLog	Fri Jul 11 19:32:46 2008 +0200
@@ -1,3 +1,10 @@
+2008-07-11  Jim Meyering  <meyering@redhat.com>
+
+	vc-list-files: make the last-resort awk code more portable
+	* build-aux/vc-list-files: Don't rely on awk's "sub" command.
+	/bin/awk from OpenSolaris 11's SUNWesu version 2008.03.22.10.56
+	does not support it.
+
 2008-07-10  Eric Blake  <ebb9@byu.net>
 
 	Work with tar's bootstrap.
--- a/build-aux/vc-list-files	Thu Jul 10 15:10:42 2008 -0600
+++ b/build-aux/vc-list-files	Fri Jul 11 19:32:46 2008 +0200
@@ -2,7 +2,7 @@
 # List version-controlled file names.
 
 # Print a version string.
-scriptversion=2008-05-01.10
+scriptversion=2008-07-11.19
 
 # Copyright (C) 2006-2008 Free Software Foundation, Inc.
 
@@ -88,7 +88,8 @@
     eval awk -F/ \''{			\
 	if (!$1 && $3 !~ /^-/) {	\
 	  f=FILENAME;			\
-	  sub(/CVS\/Entries/, "", f);	\
+	  if (f ~ /CVS\/Entries$/)	\
+	    f = substr(f, 0, length(f)-11); \
 	  print f $2;			\
 	}}'\''				\
       `find "$dir" -name Entries -print` /dev/null' $postprocess