Allow --source with -n and -p, or alone; name projects conditionally

pull/2010/head
Jimmy Brisson 2016-06-29 16:18:36 -05:00
parent 5f18943641
commit 4c5bfaa3d8
1 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ if __name__ == '__main__':
default=False,
help="clean the export directory")
group = parser.add_mutually_exclusive_group(required=True)
group = parser.add_mutually_exclusive_group(required=False)
group.add_argument("-p",
type=test_known,
dest="program",
@ -83,7 +83,7 @@ if __name__ == '__main__':
default=False,
help="writes tools/export/README.md")
group.add_argument("--source",
parser.add_argument("--source",
nargs="*",
type=argparse_filestring_type,
dest="source_dir",
@ -144,7 +144,7 @@ if __name__ == '__main__':
if src:
# --source is used to generate IDE files to toolchain directly in the source tree and doesn't generate zip file
project_dir = options.source_dir
project_name = TESTS[p]
project_name = TESTS[p] if p else "Unnamed_project"
project_temp = path.join(options.source_dir[0], 'projectfiles', '%s_%s' % (ide, mcu))
mkdir(project_temp)
lib_symbols = []