travis-ci: exec test/unit tests
[sip-router] / pkg / kamailio / deb / build_deps.sh
1 #!/bin/bash
2 #
3 # build_deps script for travis CI
4 # installs the build_deps packages needed to build Kamailio
5 # environment based on Ubuntu 12.04 LTS (precise)
6 #
7 DIST=${1:-precise}
8 BASE_DIR=${2:-$(pwd)}
9 CONTROL_FILE="${BASE_DIR}/pkg/kamailio/deb/${DIST}/control"
10 if ! [ -f "${CONTROL_FILE}" ]; then
11         echo "Error: No ${CONTROL_FILE} found"
12         exit 1
13 fi
14
15 BUILD_DEPS=$(/usr/bin/gdebi --quiet --non-interactive \
16         --option=APT::Install-Recommends=false \
17         --apt-line ${CONTROL_FILE})
18 if [ -z "${BUILD_DEPS}" ]; then
19         echo "Error: no build deps packages resolved"
20         exit 2
21 fi
22
23 apt-get install -y $BUILD_DEPS