From 5ddcc32a3ece62b7b5bbca366f81cd035fd388cc Mon Sep 17 00:00:00 2001 From: Ruediger Meier Date: Mon, 16 Mar 2015 11:21:49 +0100 Subject: travis: move install script to .travis-functions.sh Now this snippet can be re-used by non-travis systems. For example on drone.io we can use this simple build script: ...... MAKE_CHECK="root" source ./.travis-functions.sh travis_install_script || exit travis_before_script || exit ret=0 travis_script || ret=$? travis_after_script exit $ret ...... Signed-off-by: Ruediger Meier --- .travis-functions.sh | 15 +++++++++++++++ .travis.yml | 13 ++----------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/.travis-functions.sh b/.travis-functions.sh index ed491f417..ee4988d9e 100755 --- a/.travis-functions.sh +++ b/.travis-functions.sh @@ -69,6 +69,21 @@ function check_dist $MAKE distcheck || return } +function travis_install_script +{ + # install some packages from Ubuntu's default sources + sudo apt-get -qq update || return + sudo apt-get install -qq >/dev/null \ + bc \ + dnsutils \ + libcap-ng-dev \ + libpam-dev \ + libudev-dev \ + gtk-doc-tools \ + ntp \ + || return +} + function travis_before_script { pushd "$SOURCE_DIR" || return diff --git a/.travis.yml b/.travis.yml index d8cbcc4e0..931775510 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,19 +18,10 @@ branches: - /^stable.*/ install: - # install some packages from Ubuntu's default sources - - sudo apt-get -qq update - - sudo apt-get install -qq - bc - dnsutils - libcap-ng-dev - libpam-dev - libudev-dev - gtk-doc-tools - ntp + - source ./.travis-functions.sh + - travis_install_script before_script: - - source ./.travis-functions.sh - travis_before_script script: -- cgit v1.2.3-55-g7522