Merge branch 'master' of gitorious.psi.ch:pmodules/src

This commit is contained in:
2015-03-18 18:25:50 +01:00
10 changed files with 174 additions and 177 deletions

View File

@@ -117,24 +117,18 @@ function replace_path () {
sed '/^\s*$/d' | tr "\n" ":" | sed -e 's|^:||' -e 's|:$||')
}
module purge
#############################################################################
# setup environment
#
if [[ -z ${LOADEDMODULES} ]]; then
declare -x LOADEDMODULES=''
fi
if [[ -z ${MODULEPATH} ]]; then
declare -x MODULEPATH=''
for f in ${PSI_DEFAULT_FAMILIES}; do
append_path MODULEPATH "${PSI_PREFIX}/${PSI_MODULES_ROOT}/$f"
append_path PSI_LOADEDFAMILIES "${f}"
done
fi
if [[ -z ${PSI_LOADEDFAMILIES} ]]; then
declare -x PSI_LOADEDFAMILIES=''
fi
declare -x LOADEDMODULES=''
declare -x PSI_LOADEDFAMILIES=''
declare -x MODULEPATH=''
for f in ${PSI_DEFAULT_FAMILIES}; do
append_path MODULEPATH "${PSI_PREFIX}/${PSI_MODULES_ROOT}/$f"
append_path PSI_LOADEDFAMILIES "${f}"
done
replace_path PATH "${PMODULES_HOME%/*}/.*"
replace_path MANPATH "${PMODULES_HOME%/*}/.*"
@@ -151,9 +145,6 @@ fi
#############################################################################
# legacy...
#
#declare -x MODULE_VERSION=${PMODULES_VERSION}
#declare -x MODULE_VERSION_STACK="${PMODULE_VERSION}"
#declare -x MODULESHOME="${PMODULES_HOME}"
unset MODULE_VERSION
unset MODULE_VERSION_STACK
unset MODULESHOME

View File

@@ -1,5 +1,7 @@
#!@PMODULES_HOME@/bin/bash
unset CDPATH
shopt -s expand_aliases
declare -r bindir=$(cd $(dirname "$0") && pwd)
@@ -141,7 +143,7 @@ subcommand_init() {
local target_prefixes=()
local user=''
local opts=''
opts=$(get_options -o h -l src: -l user: -l help -- "$@")
opts=$(get_options -o h -l src: -l user: -l help -l version: -- "$@")
if [[ $? != 0 ]]; then
subcommand_help_init
exit 1
@@ -157,6 +159,10 @@ subcommand_init() {
user=$2
shift
;;
--version )
PMODULES_VERSION=$2
shift
;;
-- )
:
;;

View File

@@ -1,4 +1,8 @@
#!@PMODULES_HOME@/bin/bash
#
# we have to unset CDPATH, otherwise 'cd' prints the directoy!
unset CDPATH
declare -r PMODULES_DIR=$( cd "$(dirname $0)/.." && pwd )
declare -r version='@PMODULES_VERSION@'
@@ -464,6 +468,11 @@ subcommand_generic1plus() {
"${modulecmd}" "${shell}" "${subcommand}" "$@"
}
#
# load module
#
# $1: module to load
#
subcommand_load() {
output_load_hints() {
local -ra rels=( ${available_releases//:/ } )
@@ -509,7 +518,9 @@ subcommand_load() {
}
local -r m=$1
if module_is_available "${m}"; then
if [[ "${m}" == "" ]]; then
echo "No module specified." 1>&2
elif module_is_available "${m}"; then
"${modulecmd}" "${shell}" load "${m}"
else
if [[ ${userlvl} = 'novice' ]]; then

View File

@@ -21,7 +21,6 @@ function em.post_install() {
{ cd "${PREFIX}"/bin && rm -f tclsh && ln -fs tclsh${V%.*} tclsh; };
}
em.add_to_family 'Programming'
em.add_to_family 'Tools'
em.set_docfiles 'license.terms' 'README'
em.set_build_dependencies "${COMPILER}"
em.make_all

View File

@@ -8,6 +8,5 @@ function em.configure() {
|| exit 1
}
em.add_to_family 'System'
em.set_build_dependencies "${COMPILER}"
em.add_to_family 'Tools'
em.make_all

View File

@@ -8,13 +8,13 @@ source "${BASE_DIR}/config/Pmodules.conf"
unset PMODULES_HOME
source "/opt/psi/config/environment.bash"
${BOOTSTRAP_DIR}/gettext/build --bootstrap
${BOOTSTRAP_DIR}/getopt/build --bootstrap
${BOOTSTRAP_DIR}/dialog/build --bootstrap
${BOOTSTRAP_DIR}/bash/build --bootstrap
${BOOTSTRAP_DIR}/Tcl/build --bootstrap
${BOOTSTRAP_DIR}/gettext/build --bootstrap || { echo "compiling 'gettext' failed!"; exit 1; }
${BOOTSTRAP_DIR}/getopt/build --bootstrap || { echo "compiling 'getopt' failed!"; exit 1; }
${BOOTSTRAP_DIR}/dialog/build --bootstrap || { echo "compiling 'dialog' failed!"; exit 1; }
${BOOTSTRAP_DIR}/bash/build --bootstrap || { echo "compiling 'bash' failed!"; exit 1; }
${BOOTSTRAP_DIR}/Tcl/build --bootstrap || { echo "compiling 'Tcl' failed!"; exit 1; }
# we have to remove the init directory - otherwise the next build will fail...
rm -rf "${PMODULES_HOME}/init"
${BOOTSTRAP_DIR}/Modules/build --bootstrap
${BOOTSTRAP_DIR}/Modules/build --bootstrap || { echo "compiling 'Modules' failed!"; exit 1; }
mv -v "${PMODULES_HOME}/bin/modulecmd" "${PMODULES_HOME}/bin/modulecmd.tcl"

View File

@@ -9,5 +9,4 @@ function em.configure() {
}
em.add_to_family 'Tools'
em.set_build_dependencies "${COMPILER}"
em.make_all

View File

@@ -20,5 +20,4 @@ function em.configure() {
}
em.add_to_family 'Tools'
em.set_build_dependencies "${COMPILER}"
em.make_all