|
@@ -24,6 +24,16 @@ from xml.sax.saxutils import escape, unescape, quoteattr
|
|
|
MAX_ERRORS = 100
|
|
|
errorCount = 0
|
|
|
|
|
|
+def ParseInputFile(inputFilePath):
|
|
|
+ result = []
|
|
|
+ if inputFilePath:
|
|
|
+ with open(inputFilePath, 'r') as file:
|
|
|
+ # input files are expected to be separated by semicolon at first line
|
|
|
+ inputFileContent = file.readline()
|
|
|
+ inputFiles = inputFileContent.strip().split(";")
|
|
|
+ result = inputFiles
|
|
|
+ return result
|
|
|
+
|
|
|
def PrintError(*objs):
|
|
|
print(*objs, file=sys.stderr)
|
|
|
global errorCount
|
|
@@ -339,7 +349,7 @@ if __name__ == '__main__':
|
|
|
parser.add_argument("cacheDir", help="location to store jinja template cache files")
|
|
|
parser.add_argument("outputDir", help="location to output generated files")
|
|
|
parser.add_argument("projectDir", help="location to build directory against")
|
|
|
- parser.add_argument("inputFiles", help="set of files to run azcg expansion rules against")
|
|
|
+ parser.add_argument("inputFilePath", help="input file which contains autogen required files to run azcg expansion rules against")
|
|
|
parser.add_argument("expansionRules", help="set of azcg expansion rules for matching data files to template files")
|
|
|
parser.add_argument("-n", "--dryrun", action='store_true', help="does not execute autogen, only outputs the set of files that autogen would generate")
|
|
|
parser.add_argument("-v", "--verbose", action='store_true', help="output only the set of files that would be generated by an expansion run")
|
|
@@ -350,7 +360,7 @@ if __name__ == '__main__':
|
|
|
cacheDir = args.cacheDir
|
|
|
outputDir = args.outputDir
|
|
|
projectDir = args.projectDir
|
|
|
- inputFiles = args.inputFiles.split(";")
|
|
|
+ inputFiles = ParseInputFile(args.inputFilePath.strip())
|
|
|
expansionRules = args.expansionRules.split(";")
|
|
|
dryrun = args.dryrun
|
|
|
verbose = args.verbose
|