From 1b61ad6f384992f803b2dec5c0326fe44246d2aa Mon Sep 17 00:00:00 2001 From: Edwin Groothuis Date: Fri, 14 Dec 2007 08:46:57 +0000 Subject: [PATCH] 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 Approved by: grog@ X-MFC after: various freezes --- usr.bin/xinstall/xinstall.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c index d0038de10bf..49e47c65a36 100644 --- a/usr.bin/xinstall/xinstall.c +++ b/usr.bin/xinstall/xinstall.c @@ -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(); }