# Change to temporary location
cd ~
mkdir tmp
cd tmp

# Get dependencies
echo 'Installing dependencies...'
wget -q
http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/Config-Tiny-2.12.tar.gz
tar -xf Config-Tiny-2.12.tar.gz
cd Config-Tiny-2.12
perl Makefile.PL
make
sudo make install
cd ..
rm -rf Config-Tiny-2.12*

# Install program
echo 'Installing program...'
wget -q
http://www.unexpected-vortices.com/jmg/files/set_geany_colors.tar.bz2
tar -xf set_geany_colors.tar.bz2
mv set_geany_colors ~
cd ~/set_geany_colors
cp -R colorschemes ~/.config/geany
cd ..

# Perform cleanup
echo 'Performing cleanup...'
rm -rf ~/tmp/

# Run program
echo 'Starting program...'
perl ~/set_geany_colors/set_geany_colors.pl
