#!/bin/sh

function print () {
	echo -e "\e[96m # $1 \e[39m"
}


for i in mypaint libmypaint mypaint-brushes
do
	print "Cloning $i"	
	git clone --depth 1 https://github.com/mypaint/$i.git
done


mkdir prefix


for i in libmypaint mypaint-brushes
do

	print "Preparing $i"
	cd $i
	./autogen.sh
	./configure --prefix="$(pwd)/../prefix"
	make
	make install
	cd ..
done


print "Preparing mypaint"
cd mypaint
PKG_CONFIG_PATH="../prefix/lib/pkgconfig/:../prefix/share/pkgconfig/" python2.7 setup.py demo
