1SHTOOL-INSTALL.TMP(1)       GNU Portable Shell Tool      SHTOOL-INSTALL.TMP(1)
2
3
4

NAME

6       shtool install - GNU shtool install(1) command
7

SYNOPSIS

9       shtool install [-v|--verbose] [-t|--trace] [-d|--mkdir] [-c|--copy]
10       [-C|--compare-copy] [-s|--strip] [-m|--mode mode] [-o|--owner owner]
11       [-g|--group group] [-e|--exec sed-cmd] file [file ...]  path
12

DESCRIPTION

14       This command installs a one or more files to a given target path
15       providing all important options of the BSD install(1) command.  The
16       trick is that the functionality is provided in a portable way.
17

OPTIONS

19       The following command line options are available.
20
21       -v, --verbose
22           Display some processing information.
23
24       -t, --trace
25           Enable the output of the essential shell commands which are
26           executed.
27
28       -d, --mkdir
29           To maximize BSD compatiblity, the BSD "shtool "install -d"" usage
30           is internally mapped to the "shtool "mkdir -f -p -m 755"" command.
31
32       -c, --copy
33           Copy the file to the target path. Default is to move.
34
35       -C, --compare-copy
36           Same as -c except if the destination file already exists and is
37           identical to the source file, no installation is done and the
38           target remains untouched.
39
40       -s, --strip
41           This option strips program executables during the installation, see
42           strip(1). Default is to install verbatim.
43
44       -m, --mode mode
45           The file mode applied to the target, see chmod(1). Setting mode to
46           ""-"" skips this step and leaves the operating system default which
47           is usually based on umask(1). Some file modes require superuser
48           privileges to be set. Default is 0755.
49
50       -o, --owner owner
51           The file owner name or id applied to the target, see chown(1). This
52           option requires superuser privileges to execute. Default is to skip
53           this step and leave the operating system default which is usually
54           based on the executing uid or the parent setuid directory.
55
56       -g, --group group
57           The file group name or id applied to the target, see chgrp(1). This
58           option requires superuser privileges to execute to the fullest
59           extend, otherwise the choice of group is limited on most operating
60           systems.  Default is to skip this step and leave the operating
61           system default which is usually based on the executing gid or the
62           parent setgid directory.
63
64       -e, --exec sed-cmd
65           This option can be used one or multiple times to apply one or more
66           sed(1) commands to the file contents during installation.
67

EXAMPLE

69        #   Makefile
70        install:
71             :
72            shtool install -c -s -m 4755 foo $(bindir)/
73            shtool install -c -m 644 foo.man $(mandir)/man1/foo.1
74            shtool install -c -m 644 -e "s/@p@/$prefix/g" foo.conf $(etcdir)/
75

HISTORY

77       The GNU shtool install command was originally written by Ralf S.
78       Engelschall <rse@engelschall.com> in 1997 for GNU shtool. It was
79       prompted by portability issues in the installation procedures of OSSP
80       libraries.
81

SEE ALSO

83       shtool(1), umask(1), chmod(1), chown(1), chgrp(1), strip(1), sed(1).
84
85
86
8718-Jul-2008                      shtool 2.0.8            SHTOOL-INSTALL.TMP(1)
Impressum