"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "init/sh.in" between
modules-5.1.1.tar.bz2 and modules-5.2.0.tar.bz2

About: The Environment Modules package provides for the dynamic modification of a user’s environment via modulefiles.

sh.in  (modules-5.1.1.tar.bz2):sh.in  (modules-5.2.0.tar.bz2)
# shellcheck shell=sh
unset _mlshdbg; unset _mlshdbg;
# disable shell debugging for the run of this init file # disable shell debugging for the run of this init file
if [ "${MODULES_SILENT_SHELL_DEBUG:-0}" = '1' ]; then if [ "${MODULES_SILENT_SHELL_DEBUG:-0}" = '1' ]; then
# immediately disable debugging to echo the less number of line possible # immediately disable debugging to echo the less number of line possible
case "$-" in case "$-" in
*v*x*) set +vx; _mlshdbg='vx' ;; *v*x*) set +vx; _mlshdbg='vx' ;;
*v*) set +v; _mlshdbg='v' ;; *v*) set +v; _mlshdbg='v' ;;
*x*) set +x; _mlshdbg='x' ;; *x*) set +x; _mlshdbg='x' ;;
*) _mlshdbg='' ;; *) _mlshdbg='' ;;
esac; esac;
skipping to change at line 25 skipping to change at line 27
@setquarvars@@export RUNENV_VAR='RUNENV_VAL'@ @setquarvars@@export RUNENV_VAR='RUNENV_VAL'@
@notsetquarvars@#export MODULES_RUN_QUARANTINE='ENVVARNAME' @notsetquarvars@#export MODULES_RUN_QUARANTINE='ENVVARNAME'
@notsetquarvars@ @notsetquarvars@
# setup quarantine if defined # setup quarantine if defined
unset _mlre _mlIFS; unset _mlre _mlIFS;
if [ -n "${IFS+x}" ]; then if [ -n "${IFS+x}" ]; then
_mlIFS=$IFS; _mlIFS=$IFS;
fi; fi;
IFS=' '; IFS=' ';
for _mlv in ${MODULES_RUN_QUARANTINE:-}; do for _mlv in ${MODULES_RUN_QUARANTINE:-}; do
if [ "${_mlv}" = "${_mlv##*[!A-Za-z0-9_]}" -a "${_mlv}" = "${_mlv#[0-9]}" ]; if [ "${_mlv}" = "${_mlv##*[!A-Za-z0-9_]}" ] && [ "${_mlv}" = "${_mlv#[0-9]}"
then ]; then
if [ -n "$(eval 'echo ${'$_mlv'+x}')" ]; then if [ -n "$(eval 'echo ${'"$_mlv"'+x}')" ]; then
_mlre="${_mlre:-}__MODULES_QUAR_${_mlv}='$(eval 'echo ${'$_mlv'}')' "; _mlre="${_mlre:-}__MODULES_QUAR_${_mlv}='$(eval 'echo ${'"$_mlv"'}')' "
;
fi; fi;
_mlrv="MODULES_RUNENV_${_mlv}"; _mlrv="MODULES_RUNENV_${_mlv}";
_mlre="${_mlre:-}${_mlv}='$(eval 'echo ${'$_mlrv':-}')' "; _mlre="${_mlre:-}${_mlv}='$(eval 'echo ${'"$_mlrv"':-}')' ";
fi; fi;
done; done;
if [ -n "${_mlre:-}" ]; then if [ -n "${_mlre:-}" ]; then
_mlre="eval ${_mlre}__MODULES_QUARANTINE_SET=1 "; _mlre="eval ${_mlre}__MODULES_QUARANTINE_SET=1 ";
fi; fi;
# define module command and surrounding initial environment (default value # define module command and surrounding initial environment (default value
# for MODULESHOME, MODULEPATH, LOADEDMODULES and parse of init config files) # for MODULESHOME, MODULEPATH, LOADEDMODULES and parse of init config files)
_mlcode=$(${_mlre:-}@TCLSH@ @libexecdir@/modulecmd.tcl sh autoinit) # shellcheck disable=2086 # word splitting expected on _mlre
_mlcode=$(${_mlre:-}@TCLSH@ '@libexecdir@/modulecmd.tcl' sh autoinit)
_mlret=$? _mlret=$?
# clean temp variables used to setup quarantine # clean temp variables used to setup quarantine
if [ -n "${_mlIFS+x}" ]; then if [ -n "${_mlIFS+x}" ]; then
IFS=$_mlIFS; IFS=$_mlIFS;
unset _mlIFS; unset _mlIFS;
else else
unset IFS; unset IFS;
fi; fi;
unset _mlre _mlv _mlrv unset _mlre _mlv _mlrv
skipping to change at line 63 skipping to change at line 66
eval "$_mlcode" eval "$_mlcode"
# if sh is bash, export functions to get them defined in sub-shells # if sh is bash, export functions to get them defined in sub-shells
if [ "${BASH:-}" != '' ]; then if [ "${BASH:-}" != '' ]; then
export -f _module_raw export -f _module_raw
export -f module export -f module
if [ "$(type -t ml)" = 'function' ]; then if [ "$(type -t ml)" = 'function' ]; then
export -f ml export -f ml
fi fi
fi fi
@setbinpath@ case ":$PATH:" in
@setbinpath@ *:@bindir@:*) ;;
@setbinpath@@prependbinpath@ *) PATH=@bindir@${PATH:+:}$PATH
@setbinpath@@appendbinpath@ *) PATH=$PATH${PATH:+:}@bindir@
@setbinpath@ export PATH
@setbinpath@ esac
@setmanpath@
@setmanpath@ # initialize MANPATH if not set with a value that preserves manpa
th system
@setmanpath@ # configuration even after addition of paths to this variable by
modulefiles
@setmanpath@ if [ ! -n "${MANPATH+x}" ]; then
@setmanpath@ MANPATH=:
@setmanpath@ export MANPATH
@setmanpath@ fi
@setmanpath@@usemanpath@ case ":$(manpath 2>/dev/null):" in
@setmanpath@@notusemanpath@ case ":$MANPATH:" in
@setmanpath@ *:@mandir@:*) ;;
@setmanpath@ *) if [ "$MANPATH" = ':' ] || [ "$MANPATH" = '' ]; then
@setmanpath@ _mlpathsep=''
@setmanpath@ else
@setmanpath@ _mlpathsep=:
@setmanpath@ fi
@setmanpath@@prependmanpath@ MANPATH=@mandir@$_mlpathsep$MANPATH
@setmanpath@@appendmanpath@ MANPATH=$MANPATH$_mlpathsep@mandir@
@setmanpath@ export MANPATH
@setmanpath@ unset _mlpathsep
@setmanpath@ esac
fi fi
unset _mlcode _mlret unset _mlcode _mlret
# restore shell debugging options if disabled # restore shell debugging options if disabled
if [ -n "${_mlshdbg:-}" ]; then if [ -n "${_mlshdbg:-}" ]; then
set -$_mlshdbg; set -"$_mlshdbg";
unset _mlshdbg; unset _mlshdbg;
fi; fi;
# vim:set tabstop=3 shiftwidth=3 expandtab autoindent syntax=sh :
 End of changes. 7 change blocks. 
36 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)