diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-09-05 18:52:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-09-05 18:52:54 +0300 |
commit | 865c8e4bbf765e56852ec1aa74e7d9f7d8db63f5 (patch) | |
tree | a57e1c9e2bf68f3616bb92d39ee590b0b190d69d /servergreps/hercules/src/preproc.py | |
parent | 4b91c24b2aee5d7bd6d14c8b688f1078cfcce3b9 (diff) | |
download | evol-tools-865c8e4bbf765e56852ec1aa74e7d9f7d8db63f5.tar.gz evol-tools-865c8e4bbf765e56852ec1aa74e7d9f7d8db63f5.tar.bz2 evol-tools-865c8e4bbf765e56852ec1aa74e7d9f7d8db63f5.tar.xz evol-tools-865c8e4bbf765e56852ec1aa74e7d9f7d8db63f5.zip |
servergreps: move all header manipulation code into python script.
Diffstat (limited to 'servergreps/hercules/src/preproc.py')
-rwxr-xr-x | servergreps/hercules/src/preproc.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/servergreps/hercules/src/preproc.py b/servergreps/hercules/src/preproc.py new file mode 100755 index 0000000..23735c9 --- /dev/null +++ b/servergreps/hercules/src/preproc.py @@ -0,0 +1,26 @@ +#! /usr/bin/env python2 +# -*- coding: utf8 -*- +# +# Copyright (C) 2015-2016 Evol Online +# Author: Andrei Karas (4144) + +import os +import re +import sys +import shutil + +class PreProc: + def init(self, tmpDir): + if os.path.exists(tmpDir): + shutil.rmtree(tmpDir) + os.makedirs(tmpDir) + + + def run(self, subDir, outFile): + os.system( + "cpp {defines} {includes} {subDir}/{inFile} {outFile}".format( + defines = self.defines, + includes = self.includes, + subDir = self.inDir + subDir, + inFile = outFile, + outFile = self.outDir + outFile)) |