bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] vc-list-files: make the last-resort awk code more portable


From: Jim Meyering
Subject: [PATCH] vc-list-files: make the last-resort awk code more portable
Date: Fri, 11 Jul 2008 19:34:49 +0200

FYI, I've just pushed this, to avoid a failure
of tests/test-vc-list-files-cvs.sh on opensolaris.

>From 91d8d1b4835f58f1c9b9a69520e8edc886bf9060 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 11 Jul 2008 19:32:46 +0200
Subject: [PATCH] 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.
---
 ChangeLog               |    7 +++++++
 build-aux/vc-list-files |    5 +++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b1dec71..68902fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-07-11  Jim Meyering  <address@hidden>
+
+       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  <address@hidden>

        Work with tar's bootstrap.
diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files
index 8ca4530..419ab2a 100755
--- a/build-aux/vc-list-files
+++ b/build-aux/vc-list-files
@@ -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
--
1.5.6.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]