diff options
author | eschnett <eschnett@5c1b1641-b641-47ec-b3d9-0f93d4c445ee> | 2010-06-06 16:43:13 +0000 |
---|---|---|
committer | eschnett <eschnett@5c1b1641-b641-47ec-b3d9-0f93d4c445ee> | 2010-06-06 16:43:13 +0000 |
commit | 2997381434de88fcf22b16b9bd4dc6500563ad87 (patch) | |
tree | d4b1c394bd6005af02ce0f415b676df9891f3350 | |
parent | 1717d7c1657465036becbacaf20d994be969be7d (diff) |
Use existing Lorene installation if one exists
git-svn-id: http://svn.cactuscode.org/projects/ExternalLibraries/LORENE/trunk@13 5c1b1641-b641-47ec-b3d9-0f93d4c445ee
-rw-r--r-- | LORENE.sh | 50 |
1 files changed, 37 insertions, 13 deletions
@@ -8,14 +8,21 @@ set -x # Output commands set -e # Abort on errors -# Set locations -NAME=Lorene -SRCDIR=$(dirname $0) -INSTALL_DIR=${SCRATCH_BUILD} -LORENE_DIR=${INSTALL_DIR}/build-${NAME}/${NAME} -# Clean up environment -unset LIBS + +################################################################################ +# Search +################################################################################ + +if [ -z "${LORENE_DIR}" ]; then + echo "BEGIN MESSAGE" + echo "LORENE selected, but LORENE_DIR not set." + echo "END MESSAGE" +else + echo "BEGIN MESSAGE" + echo "Using LORENE in ${LORENE_DIR}" + echo "END MESSAGE" +fi @@ -23,6 +30,21 @@ unset LIBS # Build ################################################################################ +if [ -z "${LORENE_DIR}" ]; then + echo "BEGIN MESSAGE" + echo "Building LORENE..." + echo "END MESSAGE" + + # Set locations + NAME=Lorene + SRCDIR=$(dirname $0) + INSTALL_DIR=${SCRATCH_BUILD} + LORENE_DIR=${INSTALL_DIR}/build-${NAME}/${NAME} + + # Clean up environment + unset LIBS + unset MAKEFLAGS + ( exec >&2 # Redirect stdout to stderr set -x # Output commands @@ -101,12 +123,14 @@ EOF echo "LORENE: Done." fi ) - -if (( $? )); then - echo 'BEGIN ERROR' - echo 'Error while building LORENE. Aborting.' - echo 'END ERROR' - exit 1 + + if (( $? )); then + echo 'BEGIN ERROR' + echo 'Error while building LORENE. Aborting.' + echo 'END ERROR' + exit 1 + fi + fi |