2016-12-21 23:37:17 +00:00
|
|
|
# install
|
|
|
|
|
|
|
|
> Copy files and set attributes.
|
|
|
|
> Copy files (often executable) to a system location like `/usr/local/bin`, give them the appropriate permissions/ownership.
|
2021-04-01 16:54:26 +01:00
|
|
|
> More information: <https://www.gnu.org/software/coreutils/install>.
|
2016-12-21 23:37:17 +00:00
|
|
|
|
2021-08-15 18:59:09 +01:00
|
|
|
- Copy files to the destination:
|
2016-12-21 23:37:17 +00:00
|
|
|
|
2022-03-18 01:08:51 +00:00
|
|
|
`install {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}`
|
2016-12-21 23:37:17 +00:00
|
|
|
|
2021-08-15 18:59:09 +01:00
|
|
|
- Copy files to the destination, setting their ownership:
|
2016-12-21 23:37:17 +00:00
|
|
|
|
2022-03-18 01:08:51 +00:00
|
|
|
`install --owner {{user}} {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}`
|
2016-12-21 23:37:17 +00:00
|
|
|
|
2021-08-15 18:59:09 +01:00
|
|
|
- Copy files to the destination, setting their group ownership:
|
2016-12-21 23:37:17 +00:00
|
|
|
|
2022-03-18 01:08:51 +00:00
|
|
|
`install --group {{user}} {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}`
|
2016-12-21 23:37:17 +00:00
|
|
|
|
2021-08-15 18:59:09 +01:00
|
|
|
- Copy files to the destination, setting their `mode`:
|
2016-12-21 23:37:17 +00:00
|
|
|
|
2022-03-18 01:08:51 +00:00
|
|
|
`install --mode {{+x}} {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}`
|
2016-12-21 23:37:17 +00:00
|
|
|
|
2021-08-15 18:59:09 +01:00
|
|
|
- Copy files and apply access/modification times of source to the destination:
|
2016-12-21 23:37:17 +00:00
|
|
|
|
2022-03-18 01:08:51 +00:00
|
|
|
`install --preserve-timestamps {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}`
|
|
|
|
|
|
|
|
- Copy files and create the directories at the destination if they don't exist:
|
|
|
|
|
|
|
|
`install -D {{path/to/source_file1 path/to/source_file2 ...}} {{path/to/destination}}`
|