mirror of
https://github.com/envmodules/modules.git
synced 2026-06-14 00:42:43 +08:00
Reworked all the init,skel,add.* files to handle versioning or no. Added Makefile.am to ./etc/ and ./ext/ for cleaner installs.
54 lines
1.4 KiB
Plaintext
54 lines
1.4 KiB
Plaintext
if ($?tcsh) then
|
|
set modules_shell="tcsh"
|
|
else
|
|
set modules_shell="csh"
|
|
endif
|
|
@VERSIONING@if ( $?MODULE_VERSION ) then
|
|
@VERSIONING@ setenv MODULE_VERSION_STACK "$MODULE_VERSION"
|
|
@VERSIONING@else
|
|
@VERSIONING@ setenv MODULE_VERSION "@VERSION@"
|
|
@VERSIONING@ setenv MODULE_VERSION_STACK "@VERSION@"
|
|
@VERSIONING@endif
|
|
@VERSIONING@set exec_prefix='@BASEPREFIX@/Modules/$MODULE_VERSION'
|
|
@NOTVERSIONING@set exec_prefix='@bindir@'
|
|
|
|
set prefix=""
|
|
set postfix=""
|
|
|
|
if ( $?histchars ) then
|
|
set histchar = `echo $histchars | cut -c1`
|
|
set _histchars = $histchars
|
|
|
|
set prefix = 'unset histchars;'
|
|
set postfix = 'set histchars = $_histchars;'
|
|
else
|
|
set histchar = \!
|
|
endif
|
|
|
|
if ($?prompt) then
|
|
set prefix = "$prefix"'set _prompt="$prompt";set prompt="";'
|
|
set postfix = "$postfix"'set prompt="$_prompt";unset _prompt;'
|
|
endif
|
|
|
|
if ($?noglob) then
|
|
set prefix = "$prefix""set noglob;"
|
|
set postfix = "$postfix""unset noglob;"
|
|
endif
|
|
|
|
@VERSIONING@alias module $prefix'eval `'$exec_prefix'/bin/modulecmd '$modules_shell' '$histchar'*`; '$postfix
|
|
@NOTVERSIONING@alias module $prefix'eval `'$exec_prefix'/modulecmd '$modules_shell' '$histchar'*`; '$postfix
|
|
unset exec_prefix
|
|
unset prefix
|
|
unset postfix
|
|
|
|
|
|
setenv MODULESHOME @prefix@
|
|
|
|
if (! $?MODULEPATH ) then
|
|
setenv MODULEPATH `sed 's/#.*$//' ${MODULESHOME}/init/.modulespath | awk 'NF==1{printf("%s:",$1)}'`
|
|
endif
|
|
|
|
if (! $?LOADEDMODULES ) then
|
|
setenv LOADEDMODULES ""
|
|
endif
|