summaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <hun@n-dimensional.de>2016-01-20 15:01:16 +0100
committerHans Ulrich Niedermann <hun@n-dimensional.de>2016-01-20 15:01:16 +0100
commita31a37cc8f30cb7a21eeef4a41429a5347991922 (patch)
treed6a54bad9c64031914ae4c5fc7e08059194f2f41 /.travis.yml
parent78be6e00c001f28dba38f4b91698886fa6314a1b (diff)
downloadlibgphoto2-a31a37cc8f30cb7a21eeef4a41429a5347991922.tar.gz
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.
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml7
1 files changed, 6 insertions, 1 deletions
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