RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Pinto Elia
  Root:   /v/rpm/cvs                       Email:  devzero2...@rpm5.org
  Module: rpm                              Date:   02-Apr-2015 14:56:59
  Branch: rpm-5_4                          Handle: 2015040212565900

  Modified files:           (Branch: rpm-5_4)
    rpm/scripts             cross-build

  Log:
    cross-build: use the $( ... \) construct for command substitution
    
    Prefer the $( ... ) construct for command
    substitution instead of using the back-quotes, or grave accents (`..`).
    
    The backquoted form is the historical method for command substitution,
    and is supported by POSIX. However, all but the simplest uses become
    complicated quickly. In particular, embedded command substitutions
    and/or the use of double quotes require careful escaping with the backslash
    character. Because of this the POSIX shell adopted the $(…) feature from
    the Korn shell.
    
    The patch was generated by the simple script
    
    for _f in $(find . -type f -exec file {} \; | grep -i shell | awk -F: '{ 
print $1 }')
    do
      perl -i -pe 'BEGIN{undef $/;} s@`(.*)`@\$($1)@smg' ${_f}
    done

  Summary:
    Revision    Changes     Path
    1.2.22.1    +1  -1      rpm/scripts/cross-build
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/scripts/cross-build
  ============================================================================
  $ cvs diff -u -r1.2 -r1.2.22.1 cross-build
  --- rpm/scripts/cross-build   15 Jun 2001 16:01:59 -0000      1.2
  +++ rpm/scripts/cross-build   2 Apr 2015 12:56:59 -0000       1.2.22.1
  @@ -10,7 +10,7 @@
       echo $pkg
       if [ ! -r $pkg.log ]; then 
           $SHMAKE RPMFILE=$pkg 2>&1 | tee $pkg.log  
  -     if [ -r /usr/src/redhat/RPMS/sh/`echo $pkg | sed -e "s:/tmp/srpms/::" 
-e "s/.src.rpm/.sh.rpm/"` ]; then
  +     if [ -r /usr/src/redhat/RPMS/sh/$(echo $pkg | sed -e "s:/tmp/srpms/::" 
-e "s/.src.rpm/.sh.rpm/") ]; then
            mv $pkg $pkg.log /tmp/srpms/done
        fi
       fi
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to