10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-07 22:53:57 +01:00
quantum_package/setup_environment.sh

40 lines
881 B
Bash
Raw Normal View History

2014-04-01 17:49:29 +02:00
#!/bin/bash
2014-04-07 15:45:19 +02:00
#
# Setup script. Downloads IRPF90 and EZFIO if they are not already present in the current
# installation.
# Mon Apr 7 15:41:19 CEST 2014
2014-04-01 17:49:29 +02:00
2014-04-03 01:50:22 +02:00
QPACKAGE_ROOT=${PWD}
2014-04-01 17:49:29 +02:00
if [[ -z ${IRPF90} ]] ;
then
make irpf90
2014-04-03 01:50:22 +02:00
IRPF90=${QPACKAGE_ROOT}/irpf90/bin/irpf90
2014-04-07 15:45:19 +02:00
if [[ ! -x ${QPACKAGE_ROOT}/irpf90/bin/irpf90 ]]
then
echo "Error in IRPF90 installation"
exit 1
fi
2014-04-01 17:49:29 +02:00
fi
2014-04-03 01:50:22 +02:00
cat << EOF > quantum_package.rc
2014-04-01 17:49:29 +02:00
export IRPF90=${IRPF90}
2014-04-03 01:50:22 +02:00
export QPACKAGE_ROOT=${QPACKAGE_ROOT}
2014-05-13 13:57:58 +02:00
export PYTHONPATH+=:\${QPACKAGE_ROOT}/scripts
2014-04-04 00:41:43 +02:00
export PATH+=:\${QPACKAGE_ROOT}/scripts
export PATH+=:\${QPACKAGE_ROOT}/bin
export QPACKAGE_CACHE_URL="http://qmcchem.ups-tlse.fr/files/scemama/quantum_package/cache"
2014-04-01 17:49:29 +02:00
EOF
2014-04-04 00:41:43 +02:00
source quantum_package.rc
2014-04-07 15:45:19 +02:00
if [[ ! -d ${QPACKAGE_ROOT}/EZFIO ]]
then
2014-04-04 00:41:43 +02:00
make EZFIO
2014-04-07 15:45:19 +02:00
fi
if [[ ! -d ${QPACKAGE_ROOT}/EZFIO ]]
then
echo "Error in IRPF90 installation"
exit 1
fi