install: treat target as file by default instead of dir

When using 'install foo bar', bar should be treated as a file copy of
foo, not a directory to be created and into which install foo.
This commit is contained in:
Quentin Rameau 2016-02-18 11:35:22 +01:00 committed by sin
parent bb83eade39
commit bd88854850
2 changed files with 4 additions and 6 deletions

View File

@ -31,7 +31,9 @@ If more than one
.Ar source .Ar source
is given is given
.Ar dest .Ar dest
has to be a directory. is treated as a directory. Otherwise
.Ar dest
is treated as a filename.
.Nm .Nm
can also change the attributes of the copies. can also change the attributes of the copies.
.Sh OPTIONS .Sh OPTIONS
@ -43,10 +45,8 @@ Create the directories
Create missing parent directories to Create missing parent directories to
.Ar dest . .Ar dest .
If If
.Fl t
is used, the
.Ar dest .Ar dest
itself is also created if missing. is to be treated as a directory, it is created too if missing.
.It Fl g Ar group .It Fl g Ar group
Change the installed files' group to Change the installed files' group to
.Ar group . .Ar group .

View File

@ -247,8 +247,6 @@ main(int argc, char *argv[])
make_dirs(argv[argc - 1], 1); make_dirs(argv[argc - 1], 1);
*p = '/'; *p = '/';
} }
} else {
make_dirs(argv[argc - 1], 1);
} }
} }
enmasse(argc, argv, install); enmasse(argc, argv, install);