Add -S/--stages option to spack cd/spack location.

- can now change dir to top-level stage
This commit is contained in:
Todd Gamblin 2015-06-01 09:56:35 -07:00
parent 37aa88ba2a
commit 123778dec2

View file

@ -54,6 +54,8 @@ def setup_parser(subparser):
help="Top-level packages directory for Spack.")
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: