blob: 9723ae293e485033c23fbeb561f097a6e2f01382 [file] [log] [blame]
#!/bin/sh -e
. CI/travis/lib.sh
handle_centos() {
# FIXME: see about adding `libserialport-dev` from EPEL ; maybe libusb-1.0.0-devel...
yum -y groupinstall 'Development Tools'
yum -y install cmake libxml2-devel libusb1-devel doxygen libaio-devel \
avahi-devel bzip2 gzip rpm rpm-build
}
handle_centos_docker() {
prepare_docker_image "centos:centos${OS_VERSION}"
}
handle_ubuntu_docker() {
prepare_docker_image "ubuntu:${OS_VERSION}"
}
handle_default() {
sudo apt-get -qq update
sudo apt-get install -y cmake doxygen graphviz libaio-dev libavahi-client-dev libavahi-common-dev libusb-1.0-0-dev libxml2-dev rpm tar bzip2 gzip flex bison git
if [ `sudo apt-cache search libserialport-dev | wc -l` -gt 0 ] ; then
sudo apt-get install -y libserialport-dev
fi
}
OS_TYPE=${1:-default}
OS_VERSION=${2}
handle_${OS_TYPE}