summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2014-08-21 22:59:39 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2014-08-21 22:59:39 -0700
commiteb5efed421783dddbc6ebfe4ee7a9a987dfda3a5 (patch)
tree384c9057f63cb4a9d49a57e94acb2ec9b3e22d30 /share
parent5a9ef130ea51f02a486b18f7173b980f3a539440 (diff)
parente301d623329d3f484316643c6a50dc3df4806dab (diff)
downloadspack-eb5efed421783dddbc6ebfe4ee7a9a987dfda3a5.tar.gz
spack-eb5efed421783dddbc6ebfe4ee7a9a987dfda3a5.tar.bz2
spack-eb5efed421783dddbc6ebfe4ee7a9a987dfda3a5.tar.xz
spack-eb5efed421783dddbc6ebfe4ee7a9a987dfda3a5.zip
Merge branch 'features/postgresql' into develop
- add spack cd command. - Fix bug in modules hook Conflicts: lib/spack/spack/cmd/stage.py lib/spack/spack/hooks/dotkit.py share/spack/setup-env.bash
Diffstat (limited to 'share')
-rw-r--r--share/spack/csh/spack.csh4
-rwxr-xr-xshare/spack/setup-env.sh5
2 files changed, 9 insertions, 0 deletions
diff --git a/share/spack/csh/spack.csh b/share/spack/csh/spack.csh
index 169e9878bf..6073673333 100644
--- a/share/spack/csh/spack.csh
+++ b/share/spack/csh/spack.csh
@@ -45,6 +45,10 @@ set _sp_spec=""
# Figure out what type of module we're running here.
set _sp_modtype = ""
switch ($_sp_subcommand)
+case "cd":
+ shift _sp_args
+ cd `spack stage --print-build-dir $_sp_args`
+ breaksw
case use:
case unuse:
case load:
diff --git a/share/spack/setup-env.sh b/share/spack/setup-env.sh
index 0142e04817..9a6090a93b 100755
--- a/share/spack/setup-env.sh
+++ b/share/spack/setup-env.sh
@@ -75,6 +75,10 @@ function spack {
# Filter out use and unuse. For any other commands, just run the
# command.
case $_sp_subcommand in
+ "cd")
+ cd $(spack stage --print-build-dir "$@")
+ return
+ ;;
"use"|"unuse"|"load"|"unload")
# Shift any other args for use off before parsing spec.
_sp_module_args=""
@@ -108,6 +112,7 @@ function spack {
;;
*)
command spack $_sp_flags $_sp_subcommand $_sp_spec
+ ;;
esac
}