summaryrefslogtreecommitdiffstats
path: root/command.py
diff options
context:
space:
mode:
authorConley Owens <cco3@android.com>2012-04-16 11:02:21 -0700
committerShawn O. Pearce <sop@google.com>2012-04-23 12:50:00 -0700
commitd21720db313369f25b99b4d2f3f87c8be46513d9 (patch)
treea73e659e8fd18c7e3fc67880a1a9be8c2a409c86 /command.py
parent971de8ea7b7e474a4d9253b6c9f47da3f1130973 (diff)
downloadgit-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.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/command.py b/command.py
index 2ee0a43a..936ab408 100644
--- a/command.py
+++ b/command.py
@@ -15,6 +15,7 @@
15 15
16import os 16import os
17import optparse 17import optparse
18import platform
18import re 19import re
19import sys 20import 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: