diff options
author | rillig <rillig@pkgsrc.org> | 2005-11-16 20:39:02 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2005-11-16 20:39:02 +0000 |
commit | 950353e2435c9bbd5d2ac597954709b0364b060e (patch) | |
tree | dd56074025936cc19c4ce81848659ba9061e26e2 /mk/bulk/printindex | |
parent | d7a4d7acf9d0268ec9ca16c60a7461750e6a1231 (diff) | |
download | pkgsrc-950353e2435c9bbd5d2ac597954709b0364b060e.tar.gz |
- Improved the "man page" comment a little.
- Renamed the second parameter from "brokenbasedir" to "bulkfilesdir". The
latter name is already used in bsd.bulk-pkg.mk for the same purpose.
- Renamed "cwd" to "pkgsrcdir" for the same reason.
Diffstat (limited to 'mk/bulk/printindex')
-rw-r--r-- | mk/bulk/printindex | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/mk/bulk/printindex b/mk/bulk/printindex index c097aa9349e..5effc524d70 100644 --- a/mk/bulk/printindex +++ b/mk/bulk/printindex @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: printindex,v 1.22 2005/11/14 21:37:16 rillig Exp $ +# $NetBSD: printindex,v 1.23 2005/11/16 20:39:02 rillig Exp $ # # # Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -37,22 +37,20 @@ # POSSIBILITY OF SUCH DAMAGE. # -# usage: printindex [brokenfile [brokenbasedir]] +# usage: printindex [brokenfile [bulkfilesdir]] # # Generates a mapping from pkgsrc directories to the current package # version and prints it on stdout. Each line of the output has two # fields: the package directory (in the form category/package) and the # package version (in the form package-1.456nb3). # -# If the optional argument <brokenfile> is given, it specifies the -# basename of the file to which package-specific errors will be -# appended. +# If <brokenfile> is given, package-specific errors are logged to +# <bulkfilesdir>/${pkgdir}/<brokenfile>. Otherwise no additional logging +# takes place. # -# If the <brokenbasedir> is specified, the complete filename of the -# <brokenfile> is <brokenbasedir>/${pkgdir}/<brokenfile>. This -# directory is created automatically if needed. If the <brokenbasedir> -# is not specified, the <brokenfile> is created in the package directory -# itself. +# The default for <bulkfilesdir> is the pkgsrc directory itself. If +# <bulkfilesdir> differs from the pkgsrc directory, all directories +# that are needed for the log files are created automatically. # # Note: printindex must be called from a pkgsrc root directory. @@ -76,19 +74,18 @@ case ${BMAKE-""} in exit 1;; esac -# $USR_PKGSRC -cwd="${PWD}" +pkgsrcdir="${PWD}" # get some initial variables -cd "${cwd}/pkgtools/pkglint" +cd "${pkgsrcdir}/pkgtools/pkglint" BULK_PREREQ=`${BMAKE} show-var VARNAME=BULK_PREREQ` GREP=`${BMAKE} show-var VARNAME=GREP USE_TOOLS=grep` MKDIR=`${BMAKE} show-var VARNAME=MKDIR USE_TOOLS=mkdir` SED=`${BMAKE} show-var VARNAME=SED USE_TOOLS=sed` -cd "${cwd}" +cd "${pkgsrcdir}" -if [ -r "${cwd}/.pkglist" ]; then - . "${cwd}/.pkglist" +if [ -r "${pkgsrcdir}/.pkglist" ]; then + . "${pkgsrcdir}/.pkglist" else # fall back to all packages. list=`${GREP} '^[[:space:]]*'SUBDIR */Makefile | ${SED} 's,/Makefile.*=[[:space:]]*,/,'` @@ -117,7 +114,7 @@ for pkgdir in $list :detect_duplicates: $BULK_PREREQ; do esac;; esac - if cd "${cwd}/${pkgdir}"; then + if cd "${pkgsrcdir}/${pkgdir}"; then if pkgname=`${BMAKE} show-var VARNAME=PKGNAME`; then echo "${pkgdir} ${pkgname}" done_pkgs="${done_pkgs} =${pkgdir}=" |