install.sh: verify that xargs is sane
commit73d552074ea7c520ca7bf3f57bc9251251b26142
authorKyle J. McKay <mackyle@gmail.com>
Mon, 20 Nov 2017 19:06:06 +0000 (20 11:06 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Mon, 20 Nov 2017 19:06:06 +0000 (20 11:06 -0800)
treea29ad02798ce27260f546bfa92e8d769a71f4f49
parentd9c8f960ccc2091526982924734d9dd8061d777d
install.sh: verify that xargs is sane

There is some confusion about what this should output:

    </dev/null xargs echo test

Before answering, consider that this, which is POSIX,
does NOT run the -exec "echo" command at all:

    find . -type f ! -type f -exec echo '{}' +

Since xargs is often fed a list of filenames to
operate on, having it run a command to operate on
files but not actually passing that command any
filenames does not work out so well in practice.

Some systems recognize the insanity of having
"</dev/null xargs echo test" output anything while
others insist that it should but then go ahead and
provide an option to make it not do so.

Either of these approaches will be tolerated
provided the magic option on the "insane" systems
happens to be "-r".  Any "insane" systems that
do not provide an option (or it's not "-r") are
not supported.

Check this at `install.sh` time and complain
loudly and fail if xargs is insanely unusable.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
install.sh
shlib.sh