From a269e04e3d57d9b1c2271d00fcccbce9311d44d7 Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Fri, 18 Oct 2019 12:11:20 -0700 Subject: [PATCH] added linux support to snippets make_prefab --- tools/snippets | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tools/snippets b/tools/snippets index 40908bc0..57d13431 100755 --- a/tools/snippets +++ b/tools/snippets @@ -644,10 +644,22 @@ def make_prefab() -> None: from efrotools import run import platform - if platform.system() == 'Darwin': + system = platform.system() + machine = platform.machine() + if system == 'Darwin': + # Currently there's just x86_64 on mac; will need to revisit when arm + # cpus happen. base = 'mac' + elif system == 'Linux': + # We currently only support x86_64 linux. + if machine == 'x86_64': + base = 'linux' + else: + raise RuntimeError(f'make_prefab: unsupported linux machine type:' + f' {machine}.') else: - raise RuntimeError('Prefab not supported on this platform.') + raise RuntimeError(f'make_prefab: unrecognized platform:' + f' {platform.system()}.') if len(sys.argv) != 3: raise RuntimeError('Expected one argument')