diff options
author | Mattias Andrée <maandree@operamail.com> | 2013-10-12 12:14:50 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2013-10-12 12:14:50 +0200 |
commit | 4c2b2c2fe7e77a15142ca8b4f8828959d44935c1 (patch) | |
tree | cab72c60a3a026dc1fa9a82b0977a549e24037cc | |
parent | add --copying and --version (diff) | |
download | gpp-4c2b2c2fe7e77a15142ca8b4f8828959d44935c1.tar.gz gpp-4c2b2c2fe7e77a15142ca8b4f8828959d44935c1.tar.bz2 gpp-4c2b2c2fe7e77a15142ca8b4f8828959d44935c1.tar.xz |
add --export
Diffstat (limited to '')
-rwxr-xr-x | src/gpp.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -52,6 +52,12 @@ for i in range(1, len(args)): elif arg in ('-f', '--file'): input_file = sys.argv[i] output_file = sys.argv[i] + elif arg in ('-D', '--export'): + export = sys.argv[i] + if '=' not in export: + export += '=1' + export = (export.split('=')[0], '='.join(export.split('=')[1:])) + os.putenv(export[0], export[1]) elif arg in ('-v', '--version'): print('gpp ' + VERSION) sys.exit(0) |