SOURCES: gzip-CAN-2005-0758.patch - use sed, bash is not needed an...

sparky sparky at pld-linux.org
Fri Jun 16 21:13:30 CEST 2006


Author: sparky                       Date: Fri Jun 16 19:13:30 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- use sed, bash is not needed anymore

---- Files affected:
SOURCES:
   gzip-CAN-2005-0758.patch (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: SOURCES/gzip-CAN-2005-0758.patch
diff -u SOURCES/gzip-CAN-2005-0758.patch:1.2 SOURCES/gzip-CAN-2005-0758.patch:1.3
--- SOURCES/gzip-CAN-2005-0758.patch:1.2	Wed Jun 14 12:40:17 2006
+++ SOURCES/gzip-CAN-2005-0758.patch	Fri Jun 16 21:13:24 2006
@@ -1,22 +1,15 @@
 --- zgrep.in
 +++ zgrep.in
-@@ -1,5 +1,5 @@
- :
--#!/bin/sh
-+#!/bin/bash
- 
- # zgrep -- a wrapper around a grep program that decompresses files as needed
- # Adapted from a version sent by Charles Levert <charles at comm.polymtl.ca>
 @@ -24,7 +24,7 @@
  
  PATH="BINDIR:$PATH"; export PATH
  
 -prog=`echo $0 | sed 's|.*/||'`
-+prog=`echo "$0" | sed 's|.*/||'`
++prog=$(echo "$0" | sed 's|.*/||')
  case "$prog" in
         *egrep) grep=${EGREP-egrep -a}  ;;
         *fgrep) grep=${FGREP-fgrep -a}  ;;
-@@ -112,12 +112,15 @@
+@@ -112,12 +112,13 @@
    fi
    $uncompress -cdfq "$i" |
      if test $files_with_matches -eq 1; then
@@ -28,9 +21,7 @@
      elif test $with_filename -eq 0 && { test $# -eq 1 || test $no_filename -eq 1; }; then
        $grep $opt "$pat"
      else
-+      i=${i//\\/\\\\}
-+      i=${i//|/\\|}
-+      i=${i//&/\\&}
++      i="$(echo "$i" | sed 's/\\/\\\\/g; s/|/\\|/g; s/&/\\\&/g;' )"
        if test $with_filename -eq 1; then
         sed_script="s|^[^:]*:|${i}:|"
        else
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/gzip-CAN-2005-0758.patch?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list