summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/cmd/arch.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/spack/spack/cmd/arch.py b/lib/spack/spack/cmd/arch.py
index 1badd40f7f..4e29230c28 100644
--- a/lib/spack/spack/cmd/arch.py
+++ b/lib/spack/spack/cmd/arch.py
@@ -24,8 +24,18 @@
##############################################################################
import spack.architecture as architecture
-description = "Print the architecture for this machine"
+description = "Print architecture information about this machine."
+
+
+def setup_parser(subparser):
+ parts = subparser.add_mutually_exclusive_group()
+ parts.add_argument(
+ '-p', '--platform', action='store_true', default=False,
+ help="Print only the platform.")
def arch(parser, args):
- print architecture.sys_type()
+ if args.platform:
+ print architecture.platform()
+ else:
+ print architecture.sys_type()