Give a better description when a install of multiple files fails

because of the absence of a destination directory or if the
"destination directory" is not a directory.

PR:		bin/11826
Submitted by:	Denis Eremenko <moonshade@pnhz.kz>
Approved by:	grog@
X-MFC after:	various freezes
This commit is contained in:
Edwin Groothuis 2007-12-14 08:46:57 +00:00
parent ce448a2e74
commit 1b61ad6f38
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=174587

View File

@ -221,7 +221,12 @@ main(int argc, char *argv[])
/* can't do file1 file2 directory/file */
if (argc != 2) {
warnx("wrong number or types of arguments");
if (no_target)
warnx("target directory `%s' does not exist",
argv[argc - 1]);
else
warnx("target `%s' is not a directory",
argv[argc - 1]);
usage();
}