pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_rolling-replace/files simplify previous



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4ee70f6e86e5
branches:  trunk
changeset: 529081:4ee70f6e86e5
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Wed May 23 18:59:46 2007 +0000

description:
simplify previous

diffstat:

 pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (25 lines):

diff -r ed43251ca353 -r 4ee70f6e86e5 pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh
--- a/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh Wed May 23 18:11:05 2007 +0000
+++ b/pkgtools/pkg_rolling-replace/files/pkg_rolling-replace.sh Wed May 23 18:59:46 2007 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# $NetBSD: pkg_rolling-replace.sh,v 1.6 2007/05/23 18:11:05 tnn Exp $
+# $NetBSD: pkg_rolling-replace.sh,v 1.7 2007/05/23 18:59:46 tnn Exp $
 #<license>
 # Copyright (c) 2006 BBN Technologies Corp.  All rights reserved.
 #
@@ -66,10 +66,9 @@
 
 test -z "$PKG_DBDIR" && PKG_DBDIR=/var/db/pkg
 test -z "$MAKECONF" && MAKECONF="@MAKECONF@"
-test -f "$MAKECONF" && test -z "$PKGSRCDIR" && \
-    PKGSRCDIR="`(cat "$MAKECONF"; \
-    printf '\n_print_pkgsrcdir:\n\t@echo "${PKGSRCDIR}"\n') | \
-    "$MAKE" BSD_PKG_MK=1 -f - _print_pkgsrcdir`"
+test -f "$MAKECONF" && test -z "$PKGSRCDIR" && PKGSRCDIR="` \
+    printf '.include "%s"\n_print_pkgsrcdir:\n\t@echo "${PKGSRCDIR}"\n' \
+    "$MAKECONF" | "$MAKE" BSD_PKG_MK=1 -f - _print_pkgsrcdir`"
 test -z "$PKGSRCDIR" && PKGSRCDIR=/usr/pkgsrc
 
 unset PKG_PATH || true  #or pkgsrc makefiles will complain



Home | Main Index | Thread Index | Old Index