Grouped all the module commands under spack module
As requested in the review all the commands meant to manage module files have been grouped under the `spack module` command. Unit tests have been refactored to match the new command structure.
This commit is contained in:

committed by
Todd Gamblin

parent
7cbe1aedb7
commit
35cef16974
@@ -121,25 +121,25 @@ function spack {
|
||||
# If spack module command comes back with an error, do nothing.
|
||||
case $_sp_subcommand in
|
||||
"use")
|
||||
if _sp_full_spec=$(command spack $_sp_flags dotkit find $_sp_subcommand_args "${_sp_spec[@]}"); then
|
||||
if _sp_full_spec=$(command spack $_sp_flags module dotkit find $_sp_subcommand_args "${_sp_spec[@]}"); then
|
||||
use $_sp_module_args $_sp_full_spec
|
||||
else
|
||||
$(exit 1)
|
||||
fi ;;
|
||||
"unuse")
|
||||
if _sp_full_spec=$(command spack $_sp_flags dotkit find $_sp_subcommand_args "${_sp_spec[@]}"); then
|
||||
if _sp_full_spec=$(command spack $_sp_flags module dotkit find $_sp_subcommand_args "${_sp_spec[@]}"); then
|
||||
unuse $_sp_module_args $_sp_full_spec
|
||||
else
|
||||
$(exit 1)
|
||||
fi ;;
|
||||
"load")
|
||||
if _sp_full_spec=$(command spack $_sp_flags tcl find $_sp_subcommand_args "${_sp_spec[@]}"); then
|
||||
if _sp_full_spec=$(command spack $_sp_flags module tcl find $_sp_subcommand_args "${_sp_spec[@]}"); then
|
||||
module load $_sp_module_args $_sp_full_spec
|
||||
else
|
||||
$(exit 1)
|
||||
fi ;;
|
||||
"unload")
|
||||
if _sp_full_spec=$(command spack $_sp_flags tcl find $_sp_subcommand_args "${_sp_spec[@]}"); then
|
||||
if _sp_full_spec=$(command spack $_sp_flags module tcl find $_sp_subcommand_args "${_sp_spec[@]}"); then
|
||||
module unload $_sp_module_args $_sp_full_spec
|
||||
else
|
||||
$(exit 1)
|
||||
|
Reference in New Issue
Block a user