aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpp.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpp.py')
-rwxr-xr-xsrc/gpp.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpp.py b/src/gpp.py
index d6fdf5e..6881d98 100755
--- a/src/gpp.py
+++ b/src/gpp.py
@@ -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)