From a31a37cc8f30cb7a21eeef4a41429a5347991922 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Wed, 20 Jan 2016 15:01:16 +0100 Subject: travis: Fix sudo apt-get invocations It appears as if running "sudo apt-get" only works directly within .travis.yml but fails when used in a shell helper script. So we move the package installation commands themselves back to .travis.yml and only let the helper script only translate package names, not do any installations. --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to '.travis.yml') diff --git a/.travis.yml b/.travis.yml index 0a2af569f..a44c12223 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,13 @@ env: - EXTRALIBS="libusb-dev" - EXTRALIBS="libusb-1.0-0-dev libgd2-xpm-dev" +# Note: Keep the sudo commands in .travis.yml - they do not work from +# a helper shell script. before_install: - - sh .travis-before-install $EXTRALIBS + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install $(sh .travis-translate-pkgs $EXTRALIBS); fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -qq; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y $(sh .travis-translate-pkgs $EXTRALIBS); fi compiler: - clang -- cgit v1.2.1