pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/bulk Replaced another instance of grep|awk with a s...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ad13cd5786ce
branches:  trunk
changeset: 502872:ad13cd5786ce
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Thu Nov 10 07:11:37 2005 +0000

description:
Replaced another instance of grep|awk with a simple awk. A warning is
printed if no package name could be found for a package directory.

diffstat:

 mk/bulk/bsd.bulk-pkg.mk |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r 71461902f31d -r ad13cd5786ce mk/bulk/bsd.bulk-pkg.mk
--- a/mk/bulk/bsd.bulk-pkg.mk   Thu Nov 10 07:04:00 2005 +0000
+++ b/mk/bulk/bsd.bulk-pkg.mk   Thu Nov 10 07:11:37 2005 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.bulk-pkg.mk,v 1.92 2005/11/10 07:04:00 rillig Exp $
+#      $NetBSD: bsd.bulk-pkg.mk,v 1.93 2005/11/10 07:11:37 rillig Exp $
 
 #
 # Copyright (c) 1999, 2000 Hubert Feyrer <hubertf%NetBSD.org@localhost>
@@ -365,8 +365,8 @@
                        ${SHCOMMENT} "Install required depends via binarypkgs XXX" ; \
                        ${ECHO_MSG} "BULK> Installing packages which are required to build ${PKGNAME}." ;\
                        for pkgdir in `${SED} -n -e "/^${_ESCPKGPATH} / s;^[^:]*:;;p" ${DEPENDSFILE}` ${BULK_PREREQ} ; do \
-                               pkgname=`${GREP} "^$$pkgdir " ${INDEXFILE} | ${AWK} '{print $$2}'` ; \
-                               if [ -z "$$pkgname" ]; then continue ; fi ;\
+                               pkgname=`${AWK} '$$1 == "'"$$pkgdir"'" { print $$2; }' ${INDEXFILE}`; \
+                               if [ -z "$$pkgname" ]; then ${ECHO} "BULK> WARNING: could not find package name for directory $$pkgdir"; continue ; fi ;\
                                pkgfile=${PACKAGES}/All/$${pkgname}${PKG_SUFX} ;\
                                if ${PKG_INFO} -qe $$pkgname ; then \
                                        ${ECHO_MSG} "BULK> Required package $$pkgname ($$pkgdir) is already installed" ; \



Home | Main Index | Thread Index | Old Index