travis: rework "if test" blocks in the script section