summaryrefslogtreecommitdiff
path: root/mk/scripts
diff options
context:
space:
mode:
authorrillig <rillig>2007-10-31 19:20:08 +0000
committerrillig <rillig>2007-10-31 19:20:08 +0000
commitfb7acb1987c14392c88a14b10d98e59238ecf1d5 (patch)
tree6f40154e57552b0eb57d36ef397435b11eb767e0 /mk/scripts
parentca4a0228cce1d730690857e4aad8223d022b0dea (diff)
downloadpkgsrc-fb7acb1987c14392c88a14b10d98e59238ecf1d5.tar.gz
Changed ${TEST} to [...], since only the very basic conditions are
checked, which is handled the same by every implementation of test(1). Removed the comment saying that absolute directories can be handled. It doesn't work.
Diffstat (limited to 'mk/scripts')
-rwxr-xr-xmk/scripts/pkg_path17
1 files changed, 8 insertions, 9 deletions
diff --git a/mk/scripts/pkg_path b/mk/scripts/pkg_path
index fdf40e6644f..7884ec04b97 100755
--- a/mk/scripts/pkg_path
+++ b/mk/scripts/pkg_path
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: pkg_path,v 1.3 2006/01/23 18:38:27 jlam Exp $
+# $NetBSD: pkg_path,v 1.4 2007/10/31 19:20:08 rillig Exp $
#
# Copyright (c) 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -54,11 +54,11 @@
#
# DESCRIPTION
# pkg_path canonicalizes the specified directories into package
-# paths are are relative to the pkgsrc directory tree, and prints
+# paths that are relative to the pkgsrc directory tree, and prints
# each of them to standard output on a new line. The specified
-# directories are taken to be relative to the current directory or
-# are otherwise absolute paths. Directories that are not valid
-# package directories or are not found are skipped during processing.
+# directories are taken to be relative to the current directory.
+# Directories that are not valid package directories or are not
+# found are skipped during processing.
#
# ENVIRONMENT
# PKGSRCDIR This is the location of the pkgsrc directory tree,
@@ -69,7 +69,6 @@
: ${ECHO=echo}
: ${PKGSRCDIR="/usr/pkgsrc"}
: ${PWD_CMD="pwd -P"}
-: ${TEST=test}
self="${0##*/}"
@@ -80,7 +79,7 @@ usage() {
exitcode=0
# Process optional arguments
-while ${TEST} $# -gt 0; do
+while [ $# -gt 0 ]; do
case "$1" in
-s) PKGSRCDIR=$2; shift 2 ;;
--) shift; break ;;
@@ -94,7 +93,7 @@ done
# Process required arguments
startdir=`${PWD_CMD}`
-while ${TEST} $# -gt 0; do
+while [ $# -gt 0 ]; do
dir="$1"; shift
case "$dir" in
${PKGSRCDIR}/*) ;;
@@ -103,7 +102,7 @@ while ${TEST} $# -gt 0; do
continue
;;
esac
- if ${TEST} ! -d "$startdir/$dir"; then
+ if [ ! -d "$startdir/$dir" ]; then
${ECHO} 1>&2 "$self: \`\`$dir'' not found"
exitcode=1
continue