automake
vem com uma variante shell-script para este caso exato. Você normalmente a encontrará em /usr/share/automake-<ver>/install-sh
(onde <ver>
deve ser substituído pela versão, por exemplo, 1.11
ou 1.14
):
$ file /usr/share/automake-1.14/install-sh
/usr/share/automake-1.14/install-sh: POSIX shell script, ASCII text executable
$ /usr/share/automake-1.14/install-sh --help
Usage: /usr/share/automake-1.14/install-sh [OPTION]... [-T] SRCFILE DSTFILE
or: /usr/share/automake-1.14/install-sh [OPTION]... SRCFILES... DIRECTORY
or: /usr/share/automake-1.14/install-sh [OPTION]... -t DIRECTORY SRCFILES...
or: /usr/share/automake-1.14/install-sh [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP chgrp installed files to GROUP.
-m MODE chmod installed files to MODE.
-o USER chown installed files to USER.
-s strip installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
$