#!/bin/bash
# V. 2007-08-04 E. Schumacher
# 'exportntv.sh': script for collecting all necessary parts
# from a full Gamess installation, created on a Knoppix-5.XDVD
# with the help of gamessmakentv.csh 
if [ $USER != "knoppix" ]; then
  echo This script is for exporting Gamess compiled under
  echo Knoppix-5.XDVD to other Linuxes, e.g. Ubuntu, 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
mkdir gamess_export/qmnuc
mkdir gamess_export/tinker
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 -r qmnuc/* ../gamess_export/qmnuc
cp -r tinker/* ../gamess_export/tinker
cp /usr/lib/atlas/libblas.so.3 ~/gamess_export
cp /usr/lib/libgfortran.so.1 ~/gamess_export
cp /usr/lib/libg2c.so.0 ~/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 shut down Knoppix!
echo You may then recreate a functioning Gamess
echo on another Linux by using the script
echo 'gamrestorentv.sh' after having copied this
echo archive into your home directory.
exit


