From 5dc666b6aea69a7cb61d3853c3f23e7713f43f73 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Mon, 25 Aug 2014 17:01:48 +0200 Subject: [PATCH] Moved download and install of astyle into before_install section. Renamed files. --- .travis.yml | 4 +++- contrib/utilities/{run_travis.sh => check_indentation.sh} | 6 +----- contrib/utilities/setup_astyle.sh | 8 ++++++++ 3 files changed, 12 insertions(+), 6 deletions(-) rename contrib/utilities/{run_travis.sh => check_indentation.sh} (58%) create mode 100755 contrib/utilities/setup_astyle.sh diff --git a/.travis.yml b/.travis.yml index e069ae5507..aa013ce482 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,9 @@ language: C++ compiler: - gcc -script: ./contrib/utilities/run_travis.sh +before_install: ./contrib/utilities/setup_astyle.sh + +script: ./contrib/utilities/check_indentation.sh branches: only: diff --git a/contrib/utilities/run_travis.sh b/contrib/utilities/check_indentation.sh similarity index 58% rename from contrib/utilities/run_travis.sh rename to contrib/utilities/check_indentation.sh index a6b2ca58ca..abca027318 100755 --- a/contrib/utilities/run_travis.sh +++ b/contrib/utilities/check_indentation.sh @@ -6,12 +6,8 @@ else echo "Running indentation test on Pull Request #${TRAVIS_PULL_REQUEST}" fi -wget http://downloads.sourceforge.net/project/astyle/astyle/astyle%202.04/astyle_2.04_linux.tar.gz > /dev/null -tar xvfz astyle_2.04_linux.tar.gz > /dev/null -cd astyle/build/gcc -make -j4 > /dev/null -cd ../../../ export PATH=`pwd`/astyle/build/gcc/bin:$PATH + ./contrib/utilities/indent git diff git diff-files --quiet diff --git a/contrib/utilities/setup_astyle.sh b/contrib/utilities/setup_astyle.sh new file mode 100755 index 0000000000..cb1488595e --- /dev/null +++ b/contrib/utilities/setup_astyle.sh @@ -0,0 +1,8 @@ +#!/bin/sh +echo "Downloading and installing astyle." +wget http://downloads.sourceforge.net/project/astyle/astyle/astyle%202.04/astyle_2.04_linux.tar.gz > /dev/null +tar xvfz astyle_2.04_linux.tar.gz > /dev/null +cd astyle/build/gcc +make -j4 > /dev/null +cd ../../../ +export PATH=`pwd`/astyle/build/gcc/bin:$PATH -- 2.39.5