File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 2929 sys .argv .pop (sys .argv .index ("--build_timeout" ) + 1 )
3030 sys .argv .remove ("--build_timeout" )
3131
32+ # optional --boards-local-txt option to copy boards.local.txt
33+ # to the appropriate package folder after installing the platform
34+ COPY_BOARDS_LOCAL_TXT = False
35+ boards_local_txt = None
36+ if "--boards-local-txt" in sys .argv :
37+ COPY_BOARDS_LOCAL_TXT = True
38+ if sys .argv .index ("--boards-local-txt" ) + 1 >= len (sys .argv ):
39+ # check if in cwd
40+ if os .path .exists ("boards.local.txt" ):
41+ boards_local_txt = "boards.local.txt"
42+ else :
43+ sys .stderr .write ("Error: --boards-local-txt option requires a path to boards.local.txt file\n " )
44+ sys .exit (1 )
45+ else :
46+ # get the boards.local.txt file from the command line
47+ if not os .path .exists (sys .argv [sys .argv .index ("--boards-local-txt" ) + 1 ]):
48+ sys .stderr .write ("Error: boards.local.txt file does not exist\n " )
49+ sys .exit (1 )
50+ boards_local_txt = sys .argv [sys .argv .index ("--boards-local-txt" ) + 1 ]
51+ sys .argv .pop (sys .argv .index ("--boards-local-txt" ) + 1 )
52+ sys .argv .remove ("--boards-local-txt" )
53+
3254# add user bin to path!
3355BUILD_DIR = ''
3456# add user bin to path!
You can’t perform that action at this time.
0 commit comments