You are not logged in.
sorry if this has been asked before, but the forum doesn't like it if i search for this.
is it possible to use the 'install' program to install a folder that has subdirectories? if not, how should one do this?
Last edited by libele (2021-07-28 02:52:54)
Offline
install has the `-d and `-D` options, which creates a directory and all its parents. You may invoke install multiple times (core/systemd PKGBUILD as an example).
However, that is what makepkg is being asked to do by a PKGBUILD. See it as an extra step over what the upstream installation procedure does; a kind of Arch-specific tweaking. Normally it’s the installation code — for example `make install` — that handles creation of all of the relevant directories, placing files and so on.
Last edited by mpan (2021-07-28 02:16:43)
Sometimes I seem a bit harsh — don’t get offended too easily!
Offline
ah, i see that the systemd PKGBUILD uses mv to install a folder. i was under the impression that install should be used for everything!
Offline
If it's a single directory full of files, you can do it with two install commands: one to make the directory, and another using the '-t' flag for target directory and a shell glob for files to install.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
but if it's a directory full of directories, it would okay to use mv instead of install?
Offline
You can use whatever you'd like. But if it was me, I'd use `cp -a`.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
okay, will do. i'm partial to `cp -a` as well. marking this as solved, thanks y'all!
Offline