1#!/bin/sh -e 2 3. CI/travis/lib.sh 4 5handle_centos() { 6 # FIXME: see about adding `libserialport-dev` from EPEL ; maybe libusb-1.0.0-devel... 7 yum -y groupinstall 'Development Tools' 8 yum -y install cmake libxml2-devel libusb1-devel doxygen libaio-devel \ 9 avahi-devel bzip2 gzip rpm rpm-build 10} 11 12handle_centos_docker() { 13 prepare_docker_image "centos:centos${OS_VERSION}" 14} 15 16handle_ubuntu_docker() { 17 prepare_docker_image "ubuntu:${OS_VERSION}" 18} 19 20handle_default() { 21 sudo apt-get -qq update 22 sudo apt-get install -y cmake graphviz libaio-dev libavahi-client-dev libavahi-common-dev libusb-1.0-0-dev libxml2-dev rpm tar bzip2 gzip flex bison git 23 if [ -n "${GH_DOC_TOKEN}" ] ; then 24 sudo apt-get install -y doxygen 25 fi 26 if [ `sudo apt-cache search libserialport-dev | wc -l` -gt 0 ] ; then 27 sudo apt-get install -y libserialport-dev 28 fi 29} 30 31OS_TYPE=${1:-default} 32OS_VERSION=${2} 33 34handle_${OS_TYPE} 35