mirror of
https://github.com/Pmodules/Pmodules.git
synced 2026-06-27 10:03:08 +02:00
dac5885500
- OS dependent build configuration is now in 'modbuild.conf' - set PATH before sourcing 'modbuild.conf' - installation path of modulefile fixed - go through all build steps if nothing else is specified on command line
59 lines
1.8 KiB
Bash
59 lines
1.8 KiB
Bash
#!/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_DEFAULT_GROUPS
|
|
declare -x PMODULES_DEFAULT_RELEASES
|
|
declare -x 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_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}"
|
|
|
|
############################################################################
|
|
# 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:
|