From 4bae97159b7f8b225b6b45e353888cb7fbbb4ca5 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Wed, 29 Oct 2014 22:25:30 +0100 Subject: [PATCH] Improved setup_environment.sh --- Makefile | 2 +- scripts/install_ocaml.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1a13cfc6..357eb4c7 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,7 @@ bin/m4: ocaml: curl m4 - rm ocaml/Qptypes.ml + - rm -f -- ocaml/Qptypes.ml $(MAKE) ocaml/Qptypes.ml ocaml/Qptypes.ml: diff --git a/scripts/install_ocaml.sh b/scripts/install_ocaml.sh index 72a6909a..fe9dde2f 100755 --- a/scripts/install_ocaml.sh +++ b/scripts/install_ocaml.sh @@ -6,10 +6,15 @@ QPACKAGE_ROOT=${PWD} PACKAGES="core cryptokit" +if [[ -f quantum_package.rc ]] +then + source quantum_package.rc +fi make -C ocaml Qptypes.ml &> /dev/null if [[ $? -ne 0 ]] then + rm -rf -- ${HOME}/ocamlbrew scripts/fetch_from_web.py "https://raw.github.com/hcarty/ocamlbrew/master/ocamlbrew-install" ocamlbrew-install.sh cat < ocamlbrew-install.sh | env OCAMLBREW_FLAGS="-r" bash | tee ocamlbrew_install.log grep "source " ocamlbrew_install.log | grep "etc/ocamlbrew.bashrc" >> quantum_package.rc