#!/bin/bash
python -m pip install tagme
apt-get install -y git
echo $PATH
source source.sh
git clone https://github.com/Narabzad/elr_files.git
rm /usr/lib/jvm/default-java
apt-get install -y ivy
echo $PATH
cd elr_files/pylucene-4.9.0-0/jcc
python setup.py build
python setup.py install
cd ..
make
make install
cd ..
cd ..
mkdir -p /index_dir/
cd index_dir/
apt install wget
wget https://gustav1.ux.uis.no/downloads/elr/index7_only_uri.tar.bz2 https://gustav1.ux.uis.no/downloads/elr/index7_stopped.tar.bz2
echo "Extracting... 2 files left ... "
tar xjf index7_only_uri.tar.bz2
echo "Extracting ... 1 file left ..."
rm index7_only_uri.tar.bz2 
tar xjf index7_stopped.tar.bz2
rm index7_stopped.tar.bz2
cd ..
echo "initialization and indecing done!" 
