#!/bin/bash
# scibuntu - scientific extensions for Ubuntu 6.04 LTS 
# by Urban Anjar 
# Copyleft, all rights reversed
# Ver: 0.1 061023 - First version
# Ver: 0.2 061030 - More programs, deb-installation loop
# Ver: 0.21 061106 - qalculate-gtk added
# Ver: 0.22 061111 - Removed:  libgl1-mesa-swrast and bioperl; reported dependency problems
#                    Corrected typo in treviewx
#                    Bugfix in Phylo_win installation      
LOG=.scibuntu_log

PACKAGES=" emacs21 build-essential g77 gfortran sharutils binutils sysutils tetex-base tetex-bin tetex-extra gs gv grace octave gnuplot qalculate-gtk labplot gromacs gromacs-doc rasmol pymol t-coffee r-base openbabel ncbi-tools-x11 ncbi-tools-bin python-biopython blast2  clustalw clustalx tree-puzzle treeviewx"


echo "Scibuntu: Downloading, installing and configuring software. This will take some time. Some parts of the installation requires your attention."

#Installing all Ubuntu deb packages
for P in $PACKAGES; do
	echo Installing $P
	apt-get install $P -qy >> $LOG
	echo $P ready
done

#Installing non-ubuntu packages
echo "Installing phylo_win"
wget ftp://pbil.univ-lyon1.fr/pub/mol_phylogeny/phylo_win/phylo_winlinuxPC.tgz >>$LOG
tar -xvf phylo_winlinuxPC.tgz >> $LOG
rm phylo_winlinuxPC.tgz >> $LOG
mkdir /usr/local/phylo_win
mv phylo_win*  /usr/local/phylo_win >> $LOG
mv protein.mase  /usr/local/phylo_win >> $LOG
ln -s /usr/local/phylo_win/phylo_win /usr/local/bin >> $LOG
echo "phylo_win ready"

#http://kent.dl.sourceforge.net/sourceforge/salstat/salstat.20031022.tar.gz

echo "Installing Adobe Reader"
wget http://ardownload.adobe.com/pub/adobe/reader/unix/7x/7.0.8/enu/AdobeReader_enu-7.0.8-1.i386.tar.gz >> $LOG
tar -xvf AdobeReader*.tar.gz >> $LOG
cd AdobeReader >> $LOG
gnome-terminal -e ./INSTALL >> $LOG
cd .. >> $LOG
rm -rf AdobeReader >> $LOG
rm AdobeReader*.tar.gz >> $LOG
echo "AdobeReader ready" >> $LOG

echo "SciBuntu: Done"
