OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Thomas Lotterer
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-re                       Date:   19-Mar-2004 12:43:21
  Branch: HEAD                             Handle: 2004031911432100

  Modified files:
    openpkg-re              openpkg-dev

  Log:
    awk -v requires /usr/xpg4/bin/awk on Solaris; find abs path to egrep
    and awk to avoid shell function overloading

  Summary:
    Revision    Changes     Path
    1.164       +13 -8      openpkg-re/openpkg-dev
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-re/openpkg-dev
  ============================================================================
  $ cvs diff -u -r1.163 -r1.164 openpkg-dev
  --- openpkg-re/openpkg-dev    15 Mar 2004 22:50:13 -0000      1.163
  +++ openpkg-re/openpkg-dev    19 Mar 2004 11:43:21 -0000      1.164
  @@ -54,11 +54,16 @@
   OPENPKG_EXEC="${OPENPKG_EXEC}"; E="${E}" # E (exec, instance)
   export OPENPKG_SPEC P OPENPKG_CTAG B OPENPKG_EXEC E
   
  -#   use an appropriate egrep
  -if [ -x /usr/xpg4/bin/${EGREP} ]; then
  +#   use appropriate tools
  +if [ -x /usr/xpg4/bin/egrep ]; then
       EGREP="/usr/xpg4/bin/egrep"
   else
  -    EGREP="egrep"
  +    EGREP="uwhich egrep"
  +fi
  +if [ -x /usr/xpg4/bin/awk ]; then
  +    AWK="/usr/xpg4/bin/awk"
  +else
  +    AWK="uwhich awk"
   fi
    
   #   a note about CVS HEAD
  @@ -119,12 +124,12 @@
       if [ ".$1" = ".-i" ]; then
           shift
           type $1 \
  -        | awk -v cmd=$1 'BEGIN { f=0 }
  +        | ${AWK} -v cmd=$1 'BEGIN { f=0 }
                  /^ / { if (f==1) { print $0 } }
                  /^[a-zA-Z0-9]+ is a function/ { f=1 }'
       else
           type $1 \
  -        | awk -v cmd=$1 'BEGIN { f=0 }
  +        | ${AWK} -v cmd=$1 'BEGIN { f=0 }
                  // { if (f==1) { print $0 } }
                  /^[a-zA-Z0-9]+ is a function/ { print "unalias "cmd" >/dev/null 
2>&1"; f=1 }'
       fi
  @@ -1113,7 +1118,7 @@
               echo "++ determine old version (if any)"
               tmpfile="${OPENPKG_TEMP}/${name}${GUID}"
               cvs_stat=`builtin cd ${OPENPKG_WORK}; cvs -d ${OPENPKG_REPO} stat 
src/${name}/${name}.spec 2>/dev/null | grep 'Repository revision:'`
  -            cvs_rev=`echo "${cvs_stat}" | awk '/Repository revision:/ { print $3; 
}'`
  +            cvs_rev=`echo "${cvs_stat}" | ${AWK} '/Repository revision:/ { print 
$3; }'`
               cvs_dead=`echo "${cvs_stat}" | grep '/Attic/'`
               if [ ".${cvs_dead}" != . ]; then
                   cvs_rev="No"
  @@ -1316,7 +1321,7 @@
               username=`${OPENPKG_EXEC}/lib/openpkg/shtool echo -e '%u'`
               hostname=`${OPENPKG_EXEC}/lib/openpkg/shtool echo -e '%h%d'`
               realname=`(getent passwd; cat /etc/passwd; ypcat passwd; nidump passwd 
.) 2>/dev/null |\
  -                      grep "^${username}:" | awk -F: '{ print $5; }'`
  +                      grep "^${username}:" | ${AWK} -F: '{ print $5; }'`
               if [ ".$realname" = . ]; then
                   realname="NN"
               fi
  @@ -1836,7 +1841,7 @@
           for file in $files; do
               echo "++ Running command for package specification: $file"
               tmpfile="${OPENPKG_TEMP}/${GUID}"
  -            awk -vexecute="$execute" -vfile="$file" <${file} >${tmpfile} '
  +            ${AWK} -vexecute="$execute" -vfile="$file" <${file} >${tmpfile} '
                   BEGIN { flag=0 }
                   /^%prep$/ { flag=1 }
                   /^$/ { if (flag == 1) print "    "execute" #"file; flag=0 }
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to