- merge scripts 'configure', 'compile_pmodules' and 'install_pmodules'

into new script 'build'
- merge 'environment.{bash,csh}.in' into 'profile.{bash,csh}.in'
- set version to 0.99.12
This commit is contained in:
2017-05-31 15:22:48 +02:00
parent e1fd522384
commit b80f27d2e3
11 changed files with 378 additions and 426 deletions
-30
View File
@@ -1,30 +0,0 @@
#!/bin/bash
#
# Notes:
# - PMODULES_ROOT is derived from the location of this file.
# - Some for PMODULES_CONFIG_DIR.
# - The Pmodules software must be installed in
# ${PMODULES_ROOT}/Tools/Pmodules/${PMODULES_VERSION}
#
declare -x PMODULES_MODULEFILES_DIR='modulefiles'
declare -x PMODULES_TEMPLATES_DIR='templates'
declare -x PMODULES_DEFAULT_GROUPS='Tools Programming'
declare -x PMODULES_DEFINED_RELEASES=':unstable:stable:deprecated:'
declare -x PMODULES_DEFAULT_RELEASES='stable'
if [[ -z ${PMODULES_VERSION} ]]; then
declare -x PMODULES_VERSION="@PMODULES_VERSION@"
fi
#
# DO NOT CHANGE THE FOLLOWING LINES!
declare -x PMODULES_ROOT=$(cd $(dirname "${BASH_SOURCE}")/.. && pwd)
declare -x PMODULES_CONFIG_DIR=$(basename $(cd $(dirname "${BASH_SOURCE}") && pwd))
declare -x PMODULES_HOME="${PMODULES_ROOT}/Tools/Pmodules/${PMODULES_VERSION}"
declare -x PMODULES_DIR="${PMODULES_HOME}"
declare -x PMODULES_DISTFILESDIR="@PMODULES_DISTFILESDIR@"
declare -x PMODULES_TMPDIR="@PMODULES_TMPDIR@"
-17
View File
@@ -1,17 +0,0 @@
#!/bin/tcsh
setenv PMODULES_ROOT "/opt/psi"
if ( ! $?PMODULES_VERSION ) then
setenv PMODULES_VERSION "@PMODULES_VERSION@"
endif
setenv PMODULES_HOME "$PMODULES_ROOT/Tools/Pmodules/$PMODULES_VERSION"
setenv PMODULES_DIR "${PMODULES_HOME}"
setenv PMODULES_CONFIG_DIR 'config'
setenv PMODULES_MODULEFILES_DIR 'modulefiles'
setenv PMODULES_TEMPLATES_DIR 'templates'
setenv PMODULES_DEFAULT_GROUPS 'Tools Programming'
setenv PMODULES_DEFINED_RELEASES ':unstable:stable:deprecated:'
setenv PMODULES_DEFAULT_RELEASES 'stable'
-59
View File
@@ -1,59 +0,0 @@
#!/bin/bash
#
#############################################################################
# D O N O T C H A N G E T H I S F I L E ! #
#############################################################################
#############################################################################
# read Pmodules configuration
#
_init_env_file="$(dirname ${BASH_SOURCE})/environment.bash"
if [[ ! -r "${_init_env_file}" ]]; then
echo "Oops: cannot initialize Modules!"
echo "${_init_env_file}: file does not exist or is not readable."
return 1
fi
source "${_init_env_file}"
unset _init_env_file
############################################################################
# check configuration
#
if [[ -z ${PMODULES_ROOT} ]]; then
echo "Oops: Pmodules root not set." 1>&2
return 1
fi
if [[ ! -d ${PMODULES_ROOT} ]]; then
echo "Oops: ${PMODULES_ROOT}: Set as Pmodules root, 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 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
############################################################################
# inititialize Pmodules for bash
#
_init_bash="${PMODULES_HOME}/init/bash"
if [[ ! -r "${_init_bash}" ]]; then
echo "Oops: cannot initialize Modules!"
echo "${_init_bash}: File does not exist or is not readable."
return 1
fi
source "${_init_bash}"
unset _init_bash
# Local Variables:
# mode: sh
# sh-basic-offset: 8
# tab-width: 8
# End:
+62
View File
@@ -0,0 +1,62 @@
#!/bin/bash
#
# Notes:
# - PMODULES_ROOT is derived from the location of this file.
# - Some for PMODULES_CONFIG_DIR.
# - The Pmodules software must be installed in
# ${PMODULES_ROOT}/Tools/Pmodules/${PMODULES_VERSION}
#
: ${PMODULES_DEFAULT_GROUPS:='Tools Programming'}
: ${PMODULES_DEFAULT_RELEASES:='stable'}
: ${PMODULES_VERSION:="@PMODULES_VERSION@}"
#############################################################################
# N O C H A N G E S B E L O W T H I S L I N E ! #
#############################################################################
declare -x PMODULES_DEFAULT_GROUPS
declare -x PMODULES_DEFAULT_RELEASES
declare -x PMODULES_VERSION
declare -x PMODULES_MODULEFILES_DIR='modulefiles'
declare -x PMODULES_DEFINED_RELEASES=':unstable:stable:deprecated:'
declare -x PMODULES_ROOT=$(cd $(dirname "${BASH_SOURCE}")/.. && pwd)
declare -x PMODULES_CONFIG_DIR=$(basename $(cd $(dirname "${BASH_SOURCE}") && pwd))
declare -x PMODULES_HOME="${PMODULES_ROOT}/Tools/Pmodules/${PMODULES_VERSION}"
declare -x PMODULES_DIR="${PMODULES_HOME}"
declare -x PMODULES_TEMPLATES_DIR='templates'
declare -x PMODULES_DISTFILESDIR="@PMODULES_DISTFILESDIR@"
declare -x PMODULES_TMPDIR="@PMODULES_TMPDIR@"
############################################################################
# some sanity checks
#
if [[ ! -d ${PMODULES_ROOT} ]]; then
echo "Oops: ${PMODULES_ROOT}: Set as Pmodules root, but this is not a directory." 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
############################################################################
# inititialize Pmodules for bash
#
_init_bash="${PMODULES_HOME}/init/bash"
if [[ ! -r "${_init_bash}" ]]; then
echo "Oops: cannot initialize Modules!"
echo "${_init_bash}: File does not exist or is not readable."
return 1
fi
source "${_init_bash}"
unset _init_bash
# Local Variables:
# mode: sh
# sh-basic-offset: 8
# tab-width: 8
# End:
@@ -1,16 +1,20 @@
#!/bin/tcsh
#############################################################################
# read Pmodules configuration
#
set _init_env_file="/opt/psi/config/environment.bash"
if ( ! -r "$_init_env_file" ); then
echo "Oops: cannot initialize Modules!"
echo "$_init_env_file: file does not exist or is not readable."
return 1
fi
source "$_init_env_file"
unset _init_env_file
setenv PMODULES_ROOT "/opt/psi"
if ( ! $?PMODULES_VERSION ) then
setenv PMODULES_VERSION "@PMODULES_VERSION@"
endif
setenv PMODULES_HOME "$PMODULES_ROOT/Tools/Pmodules/$PMODULES_VERSION"
setenv PMODULES_DIR "${PMODULES_HOME}"
setenv PMODULES_CONFIG_DIR 'config'
setenv PMODULES_MODULEFILES_DIR 'modulefiles'
setenv PMODULES_TEMPLATES_DIR 'templates'
setenv PMODULES_DEFAULT_GROUPS 'Tools Programming'
setenv PMODULES_DEFINED_RELEASES ':unstable:stable:deprecated:'
setenv PMODULES_DEFAULT_RELEASES 'stable'
############################################################################
# check configuration