tg: improve "set -e" friendliness
commita43036a213120ab8dbe0eb5aa35e33814139c394
authorKyle J. McKay <mackyle@gmail.com>
Tue, 20 Feb 2018 13:38:08 +0000 (20 05:38 -0800)
committerKyle J. McKay <mackyle@gmail.com>
Tue, 20 Feb 2018 13:38:08 +0000 (20 05:38 -0800)
treef7b48d3a0eb2ed5c3f2e64bbcaec75a3d259757f
parentc117ee93fa38afdfd9cb51ef92748376eaa1d850
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>
tg-delete.sh
tg-push.sh
tg.sh