Edits to get setup-env.csh working better (#4044)
* Edits to get setup-env.csh working better. Autosets the sys_type a la setup-env.sh * More stealing from bash setup script for module roots * Add error message if SPACK_ROOT isn't set * Remove _sp_lmod_root per Adam J Stewart
This commit is contained in:
parent
e453865859
commit
604f65f395
@ -39,9 +39,15 @@ if ($?SPACK_ROOT) then
|
||||
alias spack 'set _sp_args = (\!*); source $_spack_share_dir/csh/spack.csh'
|
||||
alias _spack_pathadd 'set _pa_args = (\!*) && source $_spack_share_dir/csh/pathadd.csh'
|
||||
|
||||
# Shamelessly stolen from setup-env.sh
|
||||
set _sp_sys_type = `$SPACK_ROOT/bin/spack python -c 'print(spack.architecture.sys_type())'`
|
||||
set _sp_dotkit_root = `$SPACK_ROOT/bin/spack python -c "print(spack.util.path.canonicalize_path(spack.config.get_config('config').get('module_roots').get('dotkit')))"`
|
||||
set _sp_tcl_root = `$SPACK_ROOT/bin/spack python -c "print(spack.util.path.canonicalize_path(spack.config.get_config('config').get('module_roots').get('tcl')))"`
|
||||
|
||||
# Set up modules and dotkit search paths in the user environment
|
||||
# TODO: fix SYS_TYPE to something non-LLNL-specific
|
||||
_spack_pathadd DK_NODE "$_spack_share_dir/dotkit/$SYS_TYPE"
|
||||
_spack_pathadd MODULEPATH "$_spack_share_dir/modules/$SYS_TYPE"
|
||||
_spack_pathadd DK_NODE "$_sp_dotkit_root/$_sp_sys_type"
|
||||
_spack_pathadd MODULEPATH "$_sp_tcl_root/$_sp_sys_type"
|
||||
_spack_pathadd PATH "$SPACK_ROOT/bin"
|
||||
else
|
||||
echo "ERROR: Sourcing spack setup-env.csh requires setting SPACK_ROOT to the root of your spack installation"
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user