Commit 3f19aa36 authored by gsell's avatar gsell
Browse files

Merge branch 'master' of gitorious.psi.ch:scicomp/psi-modules-buildenvironment

parents a8edf0a2 96011a88
#!/bin/bash
declare -x PSI_PREFIX=$(cd $(dirname "${BASH_SOURCE}")/.. && pwd)
declare -x PSI_CONFIG_DIR=$(basename $(cd $(dirname "${BASH_SOURCE}") && pwd))
if [[ -z ${PMODULES_VERSION} ]]; then
declare -x PMODULES_VERSION="0.99.1"
fi
declare -x PMODULES_HOME="${PSI_PREFIX}/Tools/Pmodules/${PMODULES_VERSION}"
declare -A PSI_FAMILIES=(
['Legacy']=0
['Libraries']=0
['Programming']=0
['Numeric']=0
['System']=0
['Tools']=0
['Compiler']=2
['MPI']=4
['HDF5_serial']=4
['HDF5']=6
)
declare -x PSI_CONFIG_DIR=$(basename $(cd $(dirname "${BASH_SOURCE}") && pwd))
declare -x PSI_MODULES_ROOT='modulefiles'
declare -x PSI_TEMPLATES_DIR='templates'
declare -x PSI_DEFAULT_FAMILIES='Tools Programming'
......
......@@ -15,8 +15,24 @@ unset _init_env_file
############################################################################
# check configuration
#
if [[ ! -d ${PSI_PREFIX} ]] || [[ ! -d ${PMODULES_HOME} ]]; then
echo "Oops: cannot initialize module environment !"
if [[ -z ${PSI_PREFIX} ]]; then
echo "Oops: Pmodules prefix not set." 1>&2
return 1
fi
if [[ ! -d ${PSI_PREFIX} ]]; then
echo "Oops: ${PSI_PREFIX}: Set as Pmodules prefix, but this is not a directory." 1>&2
return 1
fi
if [[ -z ${PMODULES_VERSION} ]]; then
echo "Oops: ${PMODULES_VERSION}: Pmodules version not set." 1>&2
return 1
fi
if [[ -z ${PMODULES_HOME} ]]; then
echo "Oops: ${PMODULES_HOME}: Pmodules home not set." 1>&2
return 1
fi
if [[ ! -d ${PMODULES_HOME} ]]; then
echo "Oops: ${PMODULES_HOME}: Set as Pmodules home, but this is not a directory." 1>&2
return 1
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment