Subject: RFE: support `install -D` with directory target

From: Jan Engelhardt <[email-masked]>
Date: Fri, 11 May 2012 03:15:11 +0200 (CEST)

Hi.

Using cp, one can for example execute

	cp foo/bar.txt /tmp/foo/

to have /tmp/foo/bar.txt in place after a successful copy operation, 
provided the directory /tmp/foo exists. If it does not, one has to mkdir 
it beforehand naturally. I thought that using `install -D` would remedy 
this, however found that, in coreutils up to including 8.16,

	install -D foo/bar.txt /tmp/foo/

is not implemented - the program returns the error

	install: target `/tmp/foo/' is not a directory: No such file or 
	directory

On the other hand, the following command succeeds:

	install -D foo/bar.txt /fmp/foo/bar.txt

Specifying the file's basename again on the target side argument 
(/tmp/foo/bar.txt) seems redundant, given install is "just a spruced-up 
cp".
Would you consider enhancing install to support "/tmp/foo/"?

thanks,
Jan