10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-06-24 22:22:18 +02:00
quantum_package/setup_environment.sh

64 lines
1.4 KiB
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 dependencies if they are not already present
# in the current installation.
# Thu Oct 23 22:02:08 CEST 2014
BLUE=""
RED=""
BLACK="(B"
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
IRPF90=${QPACKAGE_ROOT}/bin/irpf90
if [[ ! -x ${IRPF90} ]]
2014-04-07 15:45:19 +02:00
then
echo $RED "Error in IRPF90 installation" $BLACK
2014-04-07 15:45:19 +02:00
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-07-28 14:09:55 +02:00
export PYTHONPATH=\${PYTHONPATH}:\${QPACKAGE_ROOT}/scripts
export PATH=\${PATH}:\${QPACKAGE_ROOT}/scripts
export PATH=\${PATH}:\${QPACKAGE_ROOT}/bin
2014-10-23 23:29:17 +02:00
export PATH=\${PATH}:\${QPACKAGE_ROOT}/ocaml
2014-06-25 14:58:58 +02:00
export QPACKAGE_CACHE_URL="http://qmcchem.ups-tlse.fr/files/scemama/quantum_package/cache"
source \${QPACKAGE_ROOT}/bin/irpman > /dev/null
2014-04-01 17:49:29 +02:00
EOF
2014-04-04 00:41:43 +02:00
source quantum_package.rc
make EZFIO
2014-04-07 15:45:19 +02:00
if [[ ! -d ${QPACKAGE_ROOT}/EZFIO ]]
then
echo $RED "Error in IRPF90 installation" $BLACK
2014-04-07 15:45:19 +02:00
exit 1
fi
make ocaml
if [[ ! -f ${QPACKAGE_ROOT}/ocaml/Qptypes.ml ]]
2014-10-07 15:25:21 +02:00
then
echo $RED "Error in ocaml installation" $BLACK
exit 1
fi
echo $RED "
=======================================================
To complete the installation, add the following line to
your ~/.bashrc:
2014-10-27 12:40:30 +01:00
source ${QPACKAGE_ROOT}/quantum_package.rc
=======================================================
" $BLACK
2014-10-23 23:29:17 +02:00
source quantum_package.rc
exec bash