summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2007-01-18 10:51:48 +0000
committerrillig <rillig@pkgsrc.org>2007-01-18 10:51:48 +0000
commit777113885f3235c29acc6343e1e1b3763476b33a (patch)
treeea49a72377b4e0e3399ea049fc685ce29c2441da /mk
parent2857a07b33081019691a6475e1f01abf9d783bdc (diff)
downloadpkgsrc-777113885f3235c29acc6343e1e1b3763476b33a.tar.gz
Backed out my previous change. The variable fetchdir needs to be a
relative path. The error message nevertheless includes the full path.
Diffstat (limited to 'mk')
-rwxr-xr-xmk/fetch/fetch9
1 files changed, 3 insertions, 6 deletions
diff --git a/mk/fetch/fetch b/mk/fetch/fetch
index 054adc9858e..38f86b792cd 100755
--- a/mk/fetch/fetch
+++ b/mk/fetch/fetch
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: fetch,v 1.7 2007/01/10 14:31:35 rillig Exp $
+# $NetBSD: fetch,v 1.8 2007/01/18 10:51:48 rillig Exp $
#
# Copyright (c) 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -124,7 +124,7 @@ usage() {
# Process optional arguments
checksum=
distinfo=
-fetchdir=.
+fetchdir=. # A relative directory or "."
resume=
verbose=
while ${TEST} $# -gt 0; do
@@ -142,9 +142,6 @@ while ${TEST} $# -gt 0; do
*) break ;;
esac
done
-
-fetchdir=`cd $fetchdir && exec pwd`
-
if ${TEST} -n "$checksum" -a -z "$distinfo"; then
${ECHO} 1>&2 "$self: \`\`-c'' requires \`\`-f distinfo''."
exit 1
@@ -176,7 +173,7 @@ fi
${TEST} -d $fetchdir || ${MKDIR} -p $fetchdir 2>/dev/null
if ${TEST} ! -w $fetchdir; then
- ${ECHO} 1>&2 "$self: Cannot write to $fetchdir"
+ ${ECHO} 1>&2 "$self: Cannot write to `cd $fetchdir && pwd`"
exit 1
fi