10
1
mirror of https://gitlab.com/scemama/qmcchem.git synced 2024-11-13 09:33:39 +01:00
qmcchem/configure.sh

46 lines
994 B
Bash
Raw Normal View History

2015-12-18 22:25:32 +01:00
#!/bin/bash
set -e
set -u
2015-12-18 22:53:27 +01:00
QMCCHEM_PATH=$PWD
mkdir -p "${QMCCHEM_PATH}"/bin
cd "${QMCCHEM_PATH}"/install
2015-12-18 22:25:32 +01:00
mkdir -p Downloads _build
2015-12-18 22:53:27 +01:00
# TODO : Check if network is up (ping)
if [[ ! -x "${QMCCHEM_PATH}"/bin/ninja ]]
2015-12-18 22:25:32 +01:00
then
echo "Installing Ninja"
./scripts/install_ninja.sh &> _build/ninja.log
2015-12-18 22:53:27 +01:00
if [[ ! -x "${QMCCHEM_PATH}"/bin/ninja ]]
then
echo "Installation of Ninja failed"
exit 1
fi
2015-12-18 22:25:32 +01:00
touch _build/ninja.ok
fi
touch "${QMCCHEM_PATH}"/{src,ocaml}/.ls_md5
2015-12-29 01:25:01 +01:00
"${QMCCHEM_PATH}"/bin/ninja "$@"
cd "${QMCCHEM_PATH}"
2015-12-18 22:25:32 +01:00
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."
2015-12-29 01:25:01 +01:00
echo "Now, source the qmcchemrc file and build the program:"
echo ""
echo "source qmcchemrc"
2015-12-29 01:25:01 +01:00
echo "ninja"
echo ""
echo "====================================================================="
2015-12-18 22:25:32 +01:00