shlib.sh: avoid set -e trip ups
commitfafea5bdf8ac5c3d5051573c4e7fea830e46a2ca
authorKyle J. McKay <mackyle@gmail.com>
Wed, 8 Nov 2017 23:12:27 +0000 (8 15:12 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Wed, 8 Nov 2017 23:12:27 +0000 (8 15:12 -0800)
tree842315ba5f275fd2c95ebdd443024974dbaa476f
parent6d1675716cbe84689a5e462da13cdbccd0e1b941
shlib.sh: avoid set -e trip ups

The pattern "test condition" && "do sommething" is not
safe when running under a "set -e" environment because
when the test fails the "set -e" will trigger.

Instead use "! test condition" || "do something" which
is just about as succinct but does not trigger any
unwanted "set -e" failures.

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