clear
echo "your version of java is:"
java -version
echo '          .......                   '
echo 'with  version of java  "1.6.0" fireball-GUI runs'
echo 'if you have problems you can download from:'
echo ''
echo 'http://java.com/en/download/linux_manual.jsp'
echo ''
echo '          .......                   '
echo ''
echo '**************************************************************'
echo '**************************************************************'
echo '**            -------- IMPORTANT--------                    **'
echo '**  if you change fireball-GUI of place                     **'
echo '**  you must execute ./install in the new place             **'
echo '**                                                          **'
echo '**  write this alias in your ~/.bashrc or in your ~/.csh    **'
echo '**  this is an example using the .bashrc                    **'
echo '**                                                          **'
echo '    alias fireball-GUI="'$(pwd)'/./fireball-GUI"               '
echo '**                                                          **'
echo '**************************************************************'
echo '**************************************************************'
echo ''
echo 'Copyright 2007  by Daniel Gonzalez Trabada'
echo 'fireball-GUI is free software '
echo 'you can redistribute it and/or modify it under the terms of the'
echo 'GNU General Public License as published by the Free Software Foundation.'
echo '------------------------------------------------------------------------'
if [ -f $HOME/.fireball-GUI/profile-fireball-GUI ] ; then
echo "you have got $HOME/.fireball-GUI/profile-fireball-GUI"
else
mkdir $HOME/.fireball-GUI
echo ""> $HOME/.fireball-GUI/profile-fireball-GUI
cp -r script $HOME/.fireball-GUI/
mkdir $HOME/.fireball-GUI/temp
fi 

echo 'if [ -f fireball-GUI.jar ] ; then'>fireball-GUI
echo '  java -jar fireball-GUI.jar ./ '$HOME>>fireball-GUI
echo 'elif [ -f '$(pwd)'/fireball-GUI.jar ] ; then'>>fireball-GUI
echo '  java -jar '$(pwd)'/fireball-GUI.jar '$(pwd) $HOME>>fireball-GUI
echo 'else'>>fireball-GUI
echo '  echo "fireball-GUI.jar not encontrado ?"'>>fireball-GUI
echo '  exit'>>fireball-GUI
echo 'fi'>>fireball-GUI
chmod a+x fireball-GUI

