#!/usr/bin/env bash
#sudo cp /vagrant/provisioning/apt.conf /etc/apt/apt.conf
echo deb http://debian.koha-community.org/koha unstable main | sudo tee /etc/apt/sources.list.d/koha.list
cat /vagrant/provisioning/gpg.asc | sudo apt-key add -
sudo -E add-apt-repository ppa:webupd8team/java -y
wget -qO - https://packages.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
#echo "deb https://packages.elastic.co/elasticsearch/2.x/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-2.x.list
# Using elastic search 1.7 because 2 is too new for koha
echo "deb http://packages.elastic.co/elasticsearch/1.7/debian stable main" | sudo tee -a /etc/apt/sources.list.d/elasticsearch-1.7.list
sudo apt-get update
#sudo apt-get upgrade -y
sudo apt-get clean
sudo apt-get install git git-email build-essential make cpanminus nmap software-properties-common htop mytop vim oracle-java8-installer oracle-java8-set-default elasticsearch curl libcatmandu-marc-perl -y
sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service
