The `tflag || argc > 2` if-statement should only apply when not
creating directories (-d). Otherwise, if we are creating more than
two directories, we get an error if the last argument does not
To fix this, move the -d case above and return early.
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 <firstname.lastname@example.org>
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
Also, argv was never decreased to match the moved arguments, so the -t
parameter was added in the NULL argv slot.