grep-commit
[Top][All Lists]
Advanced

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

grep branch, master, updated. v2.18-146-gebf3c01


From: Paul Eggert
Subject: grep branch, master, updated. v2.18-146-gebf3c01
Date: Mon, 12 May 2014 18:39:00 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grep".

The branch, master has been updated
       via  ebf3c011c0e7d2af61c2b463ca49b1c3f1331304 (commit)
      from  3ad009d7892ffaac4df231575a85c3ec9696b244 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/grep.git/commit/?id=ebf3c011c0e7d2af61c2b463ca49b1c3f1331304


commit ebf3c011c0e7d2af61c2b463ca49b1c3f1331304
Author: Paul Eggert <address@hidden>
Date:   Mon May 12 11:38:28 2014 -0700

    egrep, fgrep: port to Solaris 10 /bin/sh
    
    This old shell doesn't grok ${0%/*}; see: http://bugs.gnu.org/17471
    * src/Makefile.am (egrep fgrep): Don't assume the shell does substrings.
    * src/egrep.sh (dir): New var, so that the substring calculation is
    done only once (which is a small win even with newer shells),
    and so that the calculation is easier to edit on older shells.

diff --git a/src/Makefile.am b/src/Makefile.am
index f8c9415..e2c82a4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -47,7 +47,14 @@ EXTRA_DIST = dosbuf.c egrep.sh
 egrep fgrep: egrep.sh Makefile
        $(AM_V_GEN)grep=`echo grep | sed -e '$(transform)'`     && \
        case $@ in egrep) option=-E;; fgrep) option=-F;; esac   && \
+       shell_does_substrings='set x/y && d=$${1%/*} && test "$$d" = x' && \
+       if $(SHELL) -c "$$shell_does_substrings" 2>/dev/null; then \
+         edit_substring='s,X,X,'; \
+       else \
+         edit_substring='s,\$${0%/\*},`expr "X$$0" : '\''X\\(.*\\)/'\''`,g'; \
+       fi && \
        sed -e 's|address@hidden@|$(SHELL)|g' \
+           -e "$$edit_substring" \
            -e "s|address@hidden@|$$grep|g" \
            -e "s|address@hidden@|$$option|g" <$(srcdir)/egrep.sh 
>address@hidden
        $(AM_V_at)chmod +x address@hidden
diff --git a/src/egrep.sh b/src/egrep.sh
index f1b4146..1a03d2a 100644
--- a/src/egrep.sh
+++ b/src/egrep.sh
@@ -2,8 +2,9 @@
 grep=grep
 case $0 in
   */*)
-    if test -x "${0%/*}/@grep@"; then
-      PATH=${0%/*}:$PATH
+    dir=${0%/*}
+    if test -x "$dir/@grep@"; then
+      PATH=$dir:$PATH
       address@hidden@
     fi;;
 esac

-----------------------------------------------------------------------

Summary of changes:
 src/Makefile.am |    7 +++++++
 src/egrep.sh    |    5 +++--
 2 files changed, 10 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
grep



reply via email to

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