GNU "install" -d flag -- how's it work?
It looks like the install -D
command is actually what I want.
Manpage:
-D create all leading components of DEST except the last, then copy SOURCE to DEST
Works great, except you have to specify every file individually.
install -d
is just used to create directories. You told it to create two directories, test
and test2
. test
already existed, so all it needed to do was make test2
. I don't think install
supports copying entire directory trees; it's normally used on files. You probably need to use cp
Usually what you want is to install files at right folder, without repeating your self. You can use find and install to help to keep your installation scripts more DRY
find SOURCE/ -type f -exec install -vDm 755 {} THERE/{} \;