tg: improve "set -e" friendliness
In a POSIX compliant shell, this sequence:
set -e
false && :
echo $?
will show a "1". Even though "set -e" is in effect, because the
"false" occurs in an and-or list the exit that "set -e" would
normally trigger is supposed to be suppressed.
However, even if the shell behaves correctly and does not exit, the
status code will be non-zero as a result of the "false" command.
This could potentially be problematic in a "set -e" environment.
Instead convert the troublesome "&&" chains into "||" chains that
accomplish the same thing but always leave the status set to 0.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>