Add arch- targets.
authorCarl Hetherington <cth@carlh.net>
Wed, 3 Feb 2016 13:44:38 +0000 (13:44 +0000)
committerCarl Hetherington <cth@carlh.net>
Wed, 3 Feb 2016 13:44:38 +0000 (13:44 +0000)
cdist

diff --git a/cdist b/cdist
index 769824e5d2461b598d52aa967c6cff319826f676..068c7084603261b46f9283780bdec385431a7e32 100755 (executable)
--- a/cdist
+++ b/cdist
@@ -542,6 +542,11 @@ def target_factory(s, debug, work):
         if len(p) != 3:
             raise Error("Bad Linux target name `%s'; must be something like ubuntu-12.04-32 (i.e. distro-version-bits)" % s)
         target = ChrootTarget(p[0], p[1], int(p[2]), work)
+    elif s.startswith('arch-'):
+        p = s.split('-')
+        if len(p) != 2:
+            raise Error("Bad Arch target name `%s'; must be arch-32 or arch-64")
+        target = ChrootTarget(p[0], None, p[1], work)
     elif s == 'raspbian':
         target = ChrootTarget(s, None, None, work)
     elif s == 'host':