Try to mirror the travis-ci script better