vc-list-files: make the last-resort awk code more portable
authorJim Meyering <meyering@redhat.com>
Fri, 11 Jul 2008 17:32:46 +0000 (19:32 +0200)
committerJim Meyering <meyering@redhat.com>
Fri, 11 Jul 2008 17:32:46 +0000 (19:32 +0200)
* 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.

ChangeLog
build-aux/vc-list-files

index b1dec7170b90b90779a92e09bb774fb4045dc3b7..68902fd50bfd77dd4e16cb57cc3a2866ff23333d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index 8ca4530f7ab268711784c4c7eee144e5fce70542..419ab2acab5983e15d1a2592e5c19e65c300070e 100755 (executable)
@@ -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 @@ elif test -d CVS; then
     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