#!/bin/bash -ex

export DEBIAN_FRONTEND=noninteractive

apt-get update
apt-get install -y software-properties-common
add-apt-repository -y ppa:deadsnakes/ppa
apt-get update

if [[ "$1" == *"16.04"* ]]
then
  apt-get install -y libmariadb-client-lgpl-dev libssl-dev
else
  apt-get install -y libmariadbclient-dev libssl1.0-dev
fi

apt-get install -y \
    wget gcc python3.5-dev git python3-pip python-virtualenv \
    mariadb-client \
    unzip tar nodejs nodejs-dev node-gyp npm libkrb5-dev libffi-dev
