diff --git a/.travis-ci-build b/.travis-ci-build index bea5bc2..5df4bf9 100755 --- a/.travis-ci-build +++ b/.travis-ci-build @@ -1,33 +1,22 @@ #!/bin/sh +cd $1 -build_install() -{ - ( - cd $1 - if [ "$BLD" = autotools ]; then - set -x - autoreconf -vis - mkdir build-autotools - cd build-autotools - ../configure --prefix=$HOME/.local - make - make install - set +x - elif [ "$BLD" = cmake ]; then - set -x - mkdir build-cmake - cd build-cmake - cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local .. - make - make install - set +x - else - echo "Unsupported build system: '$BLD'" >&2 - exit 1 - fi - ) -} - -git clone https://github.com/nfc-tools/libnfc -build_install libnfc -build_install . +if [ "$BLD" = autotools ]; then + set -x + autoreconf -vis + mkdir build-autotools + cd build-autotools + ../configure --prefix=$HOME/.local + make + make install +elif [ "$BLD" = cmake ]; then + set -x + mkdir build-cmake + cd build-cmake + cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local .. + make + make install +else + echo "Unsupported build system: '$BLD'" >&2 + exit 1 +fi diff --git a/.travis.yml b/.travis.yml index 1a0b58e..da8e4c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ compiler: env: - BLD=cmake - - BLD=autoconf + - BLD=autotools addons: apt: @@ -15,4 +15,7 @@ addons: - cmake - libcutter-dev -script: ./.travis-ci-build +install: + - git clone https://github.com/nfc-tools/libnfc + - ./.travis-ci-build libnfc +script: ./.travis-ci-build .