Subject: how to use 'cd' in a do-* target
To: None <>
From: Mark E. Perkins <>
List: tech-pkg
Date: 07/24/2005 07:29:53
I'm trying to use pkgsrc to maintain a local project that uses four
small files from diverse sources (i.e., there is no tar file, hence no
single repository, for the files). I thought I would simply be able to
use something like:

	${FETCH_CMD} path/to/file1
	${FETCH_CMD} path/to/file2
	${FETCH_CMD} path/to/file3
	${FETCH_CMD} path/to/file4

then use "standard" do-build and do-install in the manner of, say,

The problem is that this chokes on 'cd ${FILESDIR}' as follows:

bmake fetch
/bin/mkdir -p /Volumes/NetBSD/pkgsrc/local/testproj/files
cd /Volumes/NetBSD/pkgsrc/local/testproj/files
bmake: Exec of `cd' failed (No such file or directory)
*** Error code 1

I can accomplish what I want by using

	${FETCH_CMD} -o ${FILESDIR}/fileX path/to/fileX

but I'm curious why 'cd' fails.

This on Darwin 7.9 with up-to-date pkgsrc.