summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2015-06-01 09:56:35 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2015-06-01 09:56:35 -0700
commit123778dec253d7a1e6bd03e26708a92320ce612a (patch)
tree54c22e8c81926c58c33c556eb967093ac9dd34ab
parent37aa88ba2a0da15ec9e75545e7d01b4abbf40233 (diff)
downloadspack-123778dec253d7a1e6bd03e26708a92320ce612a.tar.gz
spack-123778dec253d7a1e6bd03e26708a92320ce612a.tar.bz2
spack-123778dec253d7a1e6bd03e26708a92320ce612a.tar.xz
spack-123778dec253d7a1e6bd03e26708a92320ce612a.zip
Add -S/--stages option to spack cd/spack location.
- can now change dir to top-level stage
-rw-r--r--lib/spack/spack/cmd/location.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/spack/spack/cmd/location.py b/lib/spack/spack/cmd/location.py
index 709e894b7f..e8e9c3f277 100644
--- a/lib/spack/spack/cmd/location.py
+++ b/lib/spack/spack/cmd/location.py
@@ -55,6 +55,8 @@ def setup_parser(subparser):
directories.add_argument(
'-s', '--stage-dir', action='store_true', help="Stage directory for a spec.")
directories.add_argument(
+ '-S', '--stages', action='store_true', help="Top level Stage directory.")
+ directories.add_argument(
'-b', '--build-dir', action='store_true',
help="Checked out or expanded source directory for a spec (requires it to be staged first).")
@@ -72,6 +74,9 @@ def location(parser, args):
elif args.packages:
print spack.db.root
+ elif args.stages:
+ print spack.stage_path
+
else:
specs = spack.cmd.parse_specs(args.spec)
if not specs: