diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-06-15 21:57:33 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-15 21:57:33 +0100 |
| commit | 58359a460072ab512d543a75563977d8b4ce28c3 (patch) | |
| tree | f11a488bd5c24c0a725fdb2603f344e1c4db74b2 | |
| parent | 29052cd43a17bf4b52cc8f7ab0bfcdadcfb37fb2 (diff) | |
Allow override of configured git_prefix.
| -rwxr-xr-x | cdist | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -124,6 +124,10 @@ class Config: raise Error('Required setting %s not found' % k) + def set(self, k, v): + for o in self.options: + o.offer(k, v) + config = Config() # @@ -668,8 +672,13 @@ def main(): parser.add_argument('-k', '--keep', help='keep working tree', action='store_true') parser.add_argument('--debug', help='build with debugging symbols where possible', action='store_true') parser.add_argument('-w', '--work', help='override default work directory') + parser.add_argument('-g', '--git-prefix', help='override configured git prefix') args = parser.parse_args() + # Override configured stuff + if args.git_prefix is not None: + config.set('git_prefix', args.git_prefix) + if args.output.find(':') == -1: # This isn't of the form host:path so make it absolute args.output = os.path.abspath(args.output) + '/' |
