sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit 725b82f6c3b9df33eccdc569bb3f85a44d31b7a5
parent d0a45d74e15f9464f7bce2f0dfa74071384335d3
Author: Quentin Rameau <quinq@fifth.space>
Date:   Thu Feb 18 11:35:22 +0100

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.

Diffstat:
xinstall.1 | 8++++----
xinstall.c | 2--
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/xinstall.1 b/xinstall.1 @@ -31,7 +31,9 @@ If more than one .Ar source is given .Ar dest -has to be a directory. +is treated as a directory. Otherwise +.Ar dest +is treated as a filename. .Nm can also change the attributes of the copies. .Sh OPTIONS @@ -43,10 +45,8 @@ Create the directories Create missing parent directories to .Ar dest . If -.Fl t -is used, the .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 Change the installed files' group to .Ar group . diff --git a/xinstall.c b/xinstall.c @@ -247,8 +247,6 @@ main(int argc, char *argv[]) make_dirs(argv[argc - 1], 1); *p = '/'; } - } else { - make_dirs(argv[argc - 1], 1); } } enmasse(argc, argv, install);