diff options
author | Conley Owens <cco3@android.com> | 2012-04-16 11:02:21 -0700 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2012-04-23 12:50:00 -0700 |
commit | d21720db313369f25b99b4d2f3f87c8be46513d9 (patch) | |
tree | a73e659e8fd18c7e3fc67880a1a9be8c2a409c86 /command.py | |
parent | 971de8ea7b7e474a4d9253b6c9f47da3f1130973 (diff) | |
download | git-repo-d21720db313369f25b99b4d2f3f87c8be46513d9.tar.gz |
Add a --platform flag
Projects may optionally specify their platform
(eg, groups="platform-linux" in the manifest).
By default, repo will automatically detect the platform. However,
users may specify --platform=[auto|all|linux|darwin].
Change-Id: Ie678851fb2fec5b0938aede01f16c53138a16537
Diffstat (limited to 'command.py')
-rw-r--r-- | command.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | import os | 16 | import os |
17 | import optparse | 17 | import optparse |
18 | import platform | ||
18 | import re | 19 | import re |
19 | import sys | 20 | import sys |
20 | 21 | ||
@@ -69,7 +70,7 @@ class Command(object): | |||
69 | 70 | ||
70 | groups = mp.config.GetString('manifest.groups') | 71 | groups = mp.config.GetString('manifest.groups') |
71 | if groups is None: | 72 | if groups is None: |
72 | groups = 'default' | 73 | groups = 'default,platform-' + platform.system().lower() |
73 | groups = [x for x in re.split('[,\s]+', groups) if x] | 74 | groups = [x for x in re.split('[,\s]+', groups) if x] |
74 | 75 | ||
75 | if not args: | 76 | if not args: |