Files
Pmodules/Pmodules/libpmodules.bash
T
gsell dac5885500 - configuration file 'environment.bash' merged into 'profile.bash'
- 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
2017-06-09 10:36:05 +02:00

40 lines
931 B
Bash

#!/bin/bash
if [[ -z ${sbindir} ]]; then
local sbindir=$(dirname "${BASH_SOURCE}")
sbindir=$(cd "${sbindir}"/.. && pwd)"/sbin"
fi
pmodules::get_options() {
"${sbindir}/getopt" "$@"
}
pmodules::check_env_vars() {
[[ -n "${PMODULES_ROOT}" ]] &&
[[ -n "${PMODULES_HOME}" ]] &&
[[ -n "${PMODULES_VERSION}" ]] || std::die 1 "
Error: the module environment you are going to use as source has not been
initialized properly!"
}
pmodules::check_directories() {
local -r src_prefix="$1"
[[ -d "${src_prefix}" ]] &&
[[ -d "${src_prefix}/${PMODULES_CONFIG_DIR}" ]] &&
[[ -d "${src_prefix}/Tools/Pmodules/${PMODULES_VERSION}" ]] || std::die 1 "
Error: the module environment '${src_prefix}' has not been initialized properly!"
}
pmodules::check_env() {
pmodules::check_env_vars
pmodules::check_directories "${PMODULES_ROOT}"
}
# Local Variables:
# mode: sh
# sh-basic-offset: 8
# tab-width: 8
# End: