#!/bin/bash
# V. 2009-11-27 E. Schumacher
# 'export.sh': script for collecting all necessary parts
# from a full Gamess installation, created on Ubuntu
# with the help of ubuntugam and gamessmake64.csh 
if [ $USER != "ubuntu" ]; then
  echo This script is for exporting Gamess compiled under
  echo Ubuntu Linux to other Linuxes, e.g. Knoppix, Fedora-7,
  echo hence it is probably not for you, sorry!
  exit
fi
#
cd /home/$USER
mkdir gamess_export
mkdir gamess_export/tests
mkdir gamess_export/mcpdata
mkdir gamess_export/tools
cd gamess
cp rungms runall gamess.00.x ericfmt.dat ddikick.x  ../gamess_export
cp *.DOC ../gamess_export
cp tests/* ../gamess_export/tests
cp mcpdata/* ../gamess_export/mcpdata
cp -r tools/* ../gamess_export/tools
cp /usr/lib/atlas/libblas.so.3gf ~/gamess_export
cp /usr/lib/libgfortran.so.3 ~/gamess_export
cp /usr/lib/libg2c.so.0 ~/gamess_export
cp /home/$USER/gmolden4.7.linux ~/gamess_export
cp /bin/csh ~/gamess_export
cd ..
tar czvf gamess_export.tar.gz gamess_export/*
echo " "
echo Copy 'gamess_export.tar.gz' to an USB Stick
echo before you shutdown Ubuntu!
echo You may then recreate a functioning Gamess
echo on another Linux by using the script
echo 'gamrestore.sh' after having copied this
echo archive into your home directory
exit


