#!/bin/sh

echo 'THIS IS NOT READY YET!'
exit 1

function install_swi {
	cd ~/src
	wget http://www.swi-prolog.org/download/devel/src/pl-7.1.28.tar.gz
	tar xzf pl-7.1.28.tar.gz
	cd pl-7.1.28
	cp build.templ build
	patch build ~/etc/swipl-build.patch
	./build
}


#build SWI Prolog
install_swi

# DOWNLOADS FROM REPOs
cd ~/src/github
git clone https://samer--/ClioPatria
git clone --recursive https://github.com/humdrum-tools/humdrum-tools

cd ~/src/hg
hg clone https://code.soundsoftware.ac.uk/hg/dml-cliopatria
hg clone https://code.soundsoftware.ac.uk/hg/ishara
hg clone https://code.soundsoftware.ac.uk/hg/kernscores-utf8

ln -s ~/src/hg/kernscores-utf8 ~/lib/kern


