10
1
mirror of https://gitlab.com/scemama/qmcchem.git synced 2024-12-22 20:33:32 +01:00
qmcchem/install/scripts/install_irpf90.sh

30 lines
569 B
Bash
Raw Normal View History

2015-12-18 22:25:32 +01:00
#!/bin/bash -x
TARGET=irpf90
function _install()
{
2015-12-18 22:53:27 +01:00
cd .. ; QMCCHEM_PATH="$PWD" ; cd -
2015-12-18 22:25:32 +01:00
set -e
set -u
2015-12-18 22:53:27 +01:00
make -C "${BUILD}" -j 8
rm -rf -- "${QMCCHEM_PATH}"/irpf90
mv "${BUILD}" "${QMCCHEM_PATH}"
2015-12-18 22:25:32 +01:00
# Check the build is OK
2015-12-18 22:53:27 +01:00
[[ -x "${QMCCHEM_PATH}"/irpf90/bin/irpf90 ]]
[[ -x "${QMCCHEM_PATH}"/irpf90/bin/irpman ]]
2015-12-18 22:25:32 +01:00
for i in irpf90 irpman
do
2015-12-18 22:53:27 +01:00
rm -rf -- "${QMCCHEM_PATH}"/bin/$i
2015-12-18 22:25:32 +01:00
cat << EOF > ../bin/$i
#!/bin/bash -u
exec "\${QMCCHEM_PATH}"/irpf90/bin/$i "\$@"
EOF
2015-12-18 22:53:27 +01:00
chmod +x "${QMCCHEM_PATH}"/bin/$i
2015-12-18 22:25:32 +01:00
done
return 0
}
source scripts/build.sh