spack/share/spack/setup-env.csh
Massimiliano Culpo 76b9c56110 Remove support for generating dotkit files (#11986)
Dotkit is being used only at a few sites and has been deprecated on new
machines. This commit removes all the code that provide support for the
generation of dotkit module files.

A new validator named "deprecatedProperties" has been added to the
jsonschema validators. It permits to prompt a warning message or exit
with an error if a property that has been marked as deprecated is
encountered.

* Removed references to dotkit in the docs
* Removed references to dotkit in setup-env-test.sh
* Added a unit test for the 'deprecatedProperties' schema validator
2019-10-02 22:15:01 -07:00

40 lines
1.5 KiB
Tcsh
Executable File

# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
#
# This file is part of Spack and sets up the spack environment for
# csh and tcsh. This includes environment modules and lmod support, and
# it also puts spack in your path. Source it like this:
#
# setenv SPACK_ROOT /path/to/spack
# source $SPACK_ROOT/share/spack/setup-env.csh
#
if ($?SPACK_ROOT) then
set _spack_source_file = $SPACK_ROOT/share/spack/setup-env.csh
set _spack_share_dir = $SPACK_ROOT/share/spack
# Command aliases point at separate source files
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'
# Set variables needed by this script
_spack_pathadd PATH "$SPACK_ROOT/bin"
eval `spack --print-shell-vars csh`
# Set up module search paths in the user environment
set tcl_roots = `echo $_sp_tcl_roots:q | sed 's/:/ /g'`
set compatible_sys_types = `echo $_sp_compatible_sys_types:q | sed 's/:/ /g'`
foreach tcl_root ($tcl_roots:q)
foreach systype ($compatible_sys_types:q)
_spack_pathadd MODULEPATH "$tcl_root/$systype"
end
end
else
echo "ERROR: Sourcing spack setup-env.csh requires setting SPACK_ROOT to "
echo " the root of your spack installation."
endif