summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-12-05 09:09:57 +0100
committerCarl Hetherington <cth@carlh.net>2019-12-05 09:09:57 +0100
commitc6a43954d253842cf104b994ed20cbdb2ae8aee3 (patch)
tree828ec9daf30b136033c3a87a9e782930a5b1a848
parent60550823d058c43527bf4155bcaddd205f48e357 (diff)
Make it possible to ignore submodules.
-rwxr-xr-xcdist7
1 files changed, 5 insertions, 2 deletions
diff --git a/cdist b/cdist
index 5ad37a0..8a1b3c4 100755
--- a/cdist
+++ b/cdist
@@ -889,14 +889,17 @@ class Tree(object):
command('git checkout %s %s %s' % (flags, spec, redirect))
self.git_commit = command_and_read('git rev-parse --short=7 HEAD')[0].strip()
- command('git submodule init --quiet')
- command('git submodule update --quiet')
proj = '%s/src/%s' % (target.directory, self.name)
self.cscript = {}
exec(open('%s/cscript' % proj).read(), self.cscript)
+ # cscript can include submodules = False to stop submodules being fetched
+ if not 'submodules' in self.cscript or self.cscript['submodules'] == True:
+ command('git submodule init --quiet')
+ command('git submodule update --quiet')
+
if os.path.exists('%s/wscript' % proj):
v = read_wscript_variable(proj, "VERSION");
if v is not None: