aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2020-08-07 10:35:28 -0400
committerXavier Claessens <xclaesse@gmail.com>2020-09-10 11:39:30 -0400
commit400a35e9ea696e9adef14274347b2e907bbec6bf (patch)
tree9eeb69d6682dd5b20e49cfecdb23c423ecc29422
parent7ba0035db7b73e1b2ca6cf496d1c4a574e2ae801 (diff)
downloadmeson-400a35e9ea696e9adef14274347b2e907bbec6bf.zip
meson-400a35e9ea696e9adef14274347b2e907bbec6bf.tar.gz
meson-400a35e9ea696e9adef14274347b2e907bbec6bf.tar.bz2
msubprojects: Add --type argument
It is often desired to only update git repositories and not pull files from wrapdb.
-rwxr-xr-xmesonbuild/msubprojects.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/mesonbuild/msubprojects.py b/mesonbuild/msubprojects.py
index e839897..b482a25 100755
--- a/mesonbuild/msubprojects.py
+++ b/mesonbuild/msubprojects.py
@@ -189,6 +189,9 @@ def foreach(wrap, repo_dir, options):
def add_common_arguments(p):
p.add_argument('--sourcedir', default='.',
help='Path to source directory')
+ p.add_argument('--type', default='',
+ choices=['file', 'git', 'hg', 'svn'],
+ help='Only subprojects of given type (default: all)')
def add_subprojects_argument(p):
p.add_argument('subprojects', nargs='*',
@@ -245,6 +248,8 @@ def run(options):
else:
wraps = r.wraps.values()
for wrap in wraps:
+ if options.type and wrap.type != options.type:
+ continue
dirname = os.path.join(subprojects_dir, wrap.directory)
options.subprojects_func(wrap, dirname, options)
return 0