Issue #2291813 by dsnopek: Move functionality from .travis.yml into a proper script.