Commit Graph

8 Commits

Author SHA1 Message Date
Michael Forney
a8a9b3bae9 xinstall: Check result of fchmod 2016-12-27 14:37:20 +01:00
Mattias Andrée
609169d600 install: ignore -s
The -s flag previously called strip(1) on the installed file.
This patch changes install(1)'s behaviour to ignore -s.

Many makefiles use the -s flag, so it has to be recognised for
compatibility, however it does not have to do anything because
symbols do not negatively affect the functionallity of binaries.

Ignoring -s have the added benefit that the user do not need
to edit makefiles if they want the symbols that are useful for
debugging. If the user wants to strip away symbols, it can be
done manually or automatically by the package manager.

Laslo: Update the man-date and remove -s from usage()

Signed-off-by: Mattias Andrée <maandree@kth.se>
2016-12-27 13:56:27 +01:00
Michael Forney
b7fb3a58e7 xinstall: Fix broken memmove with -t
memmove moves a number of bytes, not pointers, so if you passed a number
of arguments that is larger than the pointer byte size, you could
end up crashing or skipping the install of a file and installing another
twice.

Also, argv was never decreased to match the moved arguments, so the -t
parameter was added in the NULL argv slot.
2016-12-27 13:48:59 +01:00
Michael Forney
87f40834a3 parsemode: No need to return after eprintf
Also, since parsemode exits on failure, don't bother checking return
value in xinstall (this would never trigger anyway because mode_t can be
unsigned).
2016-12-27 13:33:35 +01:00
Michael Forney
083d1451ac install: Handle -c flag as a no-op
This is required in order for autoconf's AC_PROG_INSTALL to use the sbase
install. Otherwise it will fall back to the slow and sucky install-sh script
from automake.
2016-07-09 10:17:16 +01:00
Quentin Rameau
bd88854850 install: treat target as file by default instead of dir
When using 'install foo bar', bar should be treated as a file copy of
foo, not a directory to be created and into which install foo.
2016-02-18 10:48:16 +00:00
Eivind Uggedal
b97839751b install: only create parent dirs to dest given -D
Given the following commands:

    touch 1.txt; install -D 1.txt d/2.txt
    find d

The result without this fix:

    d
    d/2.txt
    d/2.txt/1.txt

The result with this patch applied:

    d
    d/2.txt
2016-02-17 08:59:19 +00:00
Eivind Uggedal
2f128ab050 install: bsd make compatibility 2016-02-15 09:41:58 +00:00