10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-12-23 04:43:50 +01:00

Fast ocaml install

This commit is contained in:
Thomas Applencourt 2015-06-08 19:00:14 +02:00
parent f35b20d7f4
commit ec2d28f240
2 changed files with 24 additions and 5 deletions

View File

@ -1,5 +1,23 @@
#!/bin/bash
cd ..
QP_ROOT=$PWD
cd -
# Fast installation
if [[ "$1" == "--fast" && ! -d ${HOME}/.opam ]]
then
MEGA_DL="${QP_ROOT}/bin/mega-dl.sh"
wget 'https://gist.githubusercontent.com/scemama/b9debaed0b76321229a5/raw/d06ca00e6ad7f3703ff4738b210f6f913c1bd8d5/mega-dl.sh' -O ${MEGA_DL}
chmod +x ${MEGA_DL}
url='https://mega.co.nz/#!ykh32ajD!2aeqh87c53tL-Z4W1msQvem-TrmRN3ftlZ_QdhKo3c4'
${MEGA_DL} $url /tmp/opam.tgz
cd $HOME
tar -zxf /tmp/opam.tgz
cd -
fi
# Normal installation
PACKAGES="core cryptokit ocamlfind sexplib"
declare -i i
@ -10,9 +28,10 @@ then
exit 1
fi
cd ..
QP_ROOT=$PWD
cd -
if [[ -d ${HOME}/.opam ]]
then
source ${HOME}/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
fi
cd Downloads || exit 1
chmod +x ocaml.sh || exit 1

View File

@ -326,7 +326,7 @@ if "ocaml" in l_need_genealogy:
l_cmd = ["cd install &&",
"wget {0} -O {1} -o /dev/null &&".format(url, path_archive),
"./scripts/install_ocaml.sh"]
"./scripts/install_ocaml.sh --fast"]
os.system(" ".join(l_cmd))
@ -369,7 +369,7 @@ l_rc = [
'export PATH="${PATH}":"${QP_PYTHON}":"${QP_ROOT}"/bin',
'export LD_LIBRARY_PATH="${QP_ROOT}"/lib:"${LD_LIBRARY_PATH}"',
'export LIBRARY_PATH="${QP_ROOT}"/lib:"${LIBRARY_PATH}"', ""
'source . ${HOME}/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true',
'source ${HOME}/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true',
""
]