diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-12-05 09:09:57 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-12-05 09:09:57 +0100 |
| commit | c6a43954d253842cf104b994ed20cbdb2ae8aee3 (patch) | |
| tree | 828ec9daf30b136033c3a87a9e782930a5b1a848 | |
| parent | 60550823d058c43527bf4155bcaddd205f48e357 (diff) | |
Make it possible to ignore submodules.
| -rwxr-xr-x | cdist | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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: |
