build_deps.sh 598 B

1234567891011121314151617181920212223
  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. BUILD_DEPS=$(/usr/bin/gdebi --quiet --non-interactive \
  15. --option=APT::Install-Recommends=false \
  16. --apt-line ${CONTROL_FILE})
  17. if [ -z "${BUILD_DEPS}" ]; then
  18. echo "Error: no build deps packages resolved"
  19. exit 2
  20. fi
  21. apt-get install -y $BUILD_DEPS