mirror of
https://gitlab.com/scemama/qmcchem.git
synced 2024-08-29 22:33:41 +02:00
46 lines
994 B
Bash
Executable File
46 lines
994 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
set -u
|
|
QMCCHEM_PATH=$PWD
|
|
mkdir -p "${QMCCHEM_PATH}"/bin
|
|
cd "${QMCCHEM_PATH}"/install
|
|
mkdir -p Downloads _build
|
|
# TODO : Check if network is up (ping)
|
|
if [[ ! -x "${QMCCHEM_PATH}"/bin/ninja ]]
|
|
then
|
|
echo "Installing Ninja"
|
|
./scripts/install_ninja.sh &> _build/ninja.log
|
|
if [[ ! -x "${QMCCHEM_PATH}"/bin/ninja ]]
|
|
then
|
|
echo "Installation of Ninja failed"
|
|
exit 1
|
|
fi
|
|
touch _build/ninja.ok
|
|
fi
|
|
touch "${QMCCHEM_PATH}"/{src,ocaml}/.ls_md5
|
|
"${QMCCHEM_PATH}"/bin/ninja "$@"
|
|
|
|
cd "${QMCCHEM_PATH}"
|
|
|
|
if [[ ! -f make.config ]]
|
|
then
|
|
which ifort > /dev/null
|
|
if [[ $? ]]
|
|
then
|
|
cp make.config.ifort make.config
|
|
else
|
|
cp make.config.gfortran make.config
|
|
fi
|
|
fi
|
|
|
|
echo "====================================================================="
|
|
echo "Configuration OK."
|
|
echo "Now, source the qmcchemrc file and build the program:"
|
|
echo ""
|
|
echo "source qmcchemrc"
|
|
echo "ninja"
|
|
echo ""
|
|
echo "====================================================================="
|
|
|