10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-03 20:54:00 +01:00
quantum_package/setup_environment.sh

64 lines
1.4 KiB
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
#
# 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"
QPACKAGE_ROOT=${PWD}
if [[ -z ${IRPF90} ]] ;
then
make irpf90
IRPF90=${QPACKAGE_ROOT}/bin/irpf90
if [[ ! -x ${IRPF90} ]]
then
echo $RED "Error in IRPF90 installation" $BLACK
exit 1
fi
fi
cat << EOF > quantum_package.rc
export IRPF90=${IRPF90}
export QPACKAGE_ROOT=${QPACKAGE_ROOT}
export PYTHONPATH=\${PYTHONPATH}:\${QPACKAGE_ROOT}/scripts
export PATH=\${PATH}:\${QPACKAGE_ROOT}/scripts
export PATH=\${PATH}:\${QPACKAGE_ROOT}/bin
export PATH=\${PATH}:\${QPACKAGE_ROOT}/ocaml
export QPACKAGE_CACHE_URL="http://qmcchem.ups-tlse.fr/files/scemama/quantum_package/cache"
source \${QPACKAGE_ROOT}/bin/irpman > /dev/null
EOF
source quantum_package.rc
make EZFIO
if [[ ! -d ${QPACKAGE_ROOT}/EZFIO ]]
then
echo $RED "Error in IRPF90 installation" $BLACK
exit 1
fi
make ocaml
if [[ ! -f ${QPACKAGE_ROOT}/ocaml/Qptypes.ml ]]
then
echo $RED "Error in ocaml installation" $BLACK
exit 1
fi
echo $RED "
=======================================================
To complete the installation, add the following line to
your ~/.bashrc:
source ${QPACKAGE_ROOT}/quantum_package.rc
=======================================================
" $BLACK
source quantum_package.rc
exec bash