2.8. Placing arbitrary artifacts in the system using the install command
Packagers often use the install
command in cases when build automation tooling such as GNU make is not optimal; for example if the packaged program does not need extra overhead.
The install
command is provided to the system by coreutils, which places the artifact to the specified directory in the file system with a specified set of permissions.
The following procedure uses the bello
file that was previously created as the arbitrary artifact as a subject to this installation method.
Procédure
Run the
install
command to place thebello
file into the/usr/bin
directory with permissions common for executable scripts:$ sudo install -m 0755 bello /usr/bin/bello
As a result,
bello
is now located in the directory that is listed in the$PATH
variable.Execute
bello
from any directory without specifying its full path:$ cd ~ $ bello Hello World