diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-04-26 23:49:23 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-04-26 23:49:23 +0100 |
| commit | 90ca8ed90c7e006a59f51c1a3288ba9df12a8297 (patch) | |
| tree | 79707a8f6fa1cf1110ae5ffd5f99aa171d0bcd69 | |
| parent | be71017812c947d1a2ca045279f52137df06a825 (diff) | |
Basic --keep option.
| -rwxr-xr-x | cdist | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -220,6 +220,8 @@ class HostEnvironment(Environment): command('%s %s' % (self.variables_string(), c)) def cleanup(self): + if args.keep: + shutil.copytree('%s/src/%s' % (self.temp, args.project), '%s/%s' % (args.output, args.project)) rmtree(self.temp) @@ -378,6 +380,7 @@ parser.add_argument('-c', '--checkout', help='string to pass to git for checkout parser.add_argument('-o', '--output', help='output directory', default='.') parser.add_argument('-q', '--quiet', help='be quiet', action='store_true') parser.add_argument('-t', '--target', help='target') +parser.add_argument('-k', '--keep', help='keep working tree', action='store_true') args = parser.parse_args() args.output = os.path.abspath(args.output) |
