From 11663c96da105e8e3ac7376fd08173991a0f3063 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 23 Oct 2014 23:29:17 +0200 Subject: [PATCH] Improved setup scripts --- Makefile | 8 +++++--- data/Makefile | 3 ++- scripts/install_ocaml.sh | 6 +++--- setup_environment.sh | 4 ++++ 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 9910a0b3..cdbe67c5 100644 --- a/Makefile +++ b/Makefile @@ -7,21 +7,23 @@ BLUE= BLACK=(B -.PHONY: doc src curl m4 ocaml irpf90 +.PHONY: doc src curl m4 ocaml irpf90 default: - ./setup_environment.sh + exec ./setup_environment.sh curl: bin/curl m4: bin/m4 irpf90: bin/irpf90 -EZFIO: irpf90 +EZFIO: bin/irpf90 $(info $(BLUE)===== Fetching EZFIO from the web ===== $(BLACK)) @sleep 1 @$(FETCH_FROM_WEB) "$(WWW_SERVER)/$(EZFIO_TGZ)" $(EZFIO_TGZ) || \ (echo Unable to download EZFIO : $(WWW_SERVER)/$(EZFIO_TGZ) ; exit 1) tar -zxf $(EZFIO_TGZ) && rm $(EZFIO_TGZ) + $(MAKE) -C src $$PWD/EZFIO + touch EZFIO bin/irpf90: $(info $(BLUE)===== Fetching IRPF90 from the web ===== $(BLACK)) diff --git a/data/Makefile b/data/Makefile index ad31ecec..243c85ed 100644 --- a/data/Makefile +++ b/data/Makefile @@ -6,4 +6,5 @@ inputs: cd inputs ; $(MAKE) all_ezfio executables: - $(MAKE) -C $(QPACKAGE_ROOT)/src executables && mv $(QPACKAGE_ROOT)/src/executables . + cd $(QPACKAGE_ROOT)/src ; $(MAKE) executables + mv $(QPACKAGE_ROOT)/src/executables . diff --git a/scripts/install_ocaml.sh b/scripts/install_ocaml.sh index aba33feb..19dbc55b 100755 --- a/scripts/install_ocaml.sh +++ b/scripts/install_ocaml.sh @@ -9,9 +9,9 @@ make -C ocaml Qptypes.ml &> /dev/null if [[ $? -ne 0 ]] then - 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 - grep "source " ocaml_install.log | grep "etc/ocamlbrew.bashrc" >> quantum_package.rc + 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 source quantum_package.rc echo Y | opam install core fi diff --git a/setup_environment.sh b/setup_environment.sh index c2a5f8b7..028b4f2a 100755 --- a/setup_environment.sh +++ b/setup_environment.sh @@ -28,6 +28,7 @@ export QPACKAGE_ROOT=${QPACKAGE_ROOT} export PYTHONPATH=\${PYTHONPATH}:\${QPACKAGE_ROOT}/scripts export PATH=\${PATH}:\${QPACKAGE_ROOT}/scripts export PATH=\${PATH}:\${QPACKAGE_ROOT}/bin +export PATH=\${PATH}:\${QPACKAGE_ROOT}/ocaml export QPACKAGE_CACHE_URL="http://qmcchem.ups-tlse.fr/files/scemama/quantum_package/cache" source \${QPACKAGE_ROOT}/bin/irpman > /dev/null EOF @@ -57,3 +58,6 @@ source quantum_package.rc ======================================================= " $BLACK +source quantum_package.rc +exec bash +