mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
* Fix: cannot build after #7060 on Win64 * add double-quotes to `compiler.S.flags` * fix windows-specific processes (`recipe.hooks.linking.prelink.[12].pattern.windows`) * rewrite processing of "mkdir" and "cp" in python because of platform-independence * make consistent with the use of quotation marks in other *.py files
This commit is contained in:
committed by
GitHub
parent
9a36cfdee9
commit
fd69945abc
19
tools/mkdir.py
Executable file
19
tools/mkdir.py
Executable file
@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Platform-independent `mkdir`
|
||||
|
||||
import argparse
|
||||
import pathlib
|
||||
import sys
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description='Platform-independent `mkdir`')
|
||||
parser.add_argument('-p', '--parents', action='store_true', required=False, help='no error if existing, make parent directories as needed')
|
||||
parser.add_argument('dir', action='store', nargs='+')
|
||||
ns = parser.parse_args()
|
||||
for p in ns.dir:
|
||||
pathlib.Path(p).mkdir(parents=ns.parents, exist_ok=True)
|
||||
return 0
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
Reference in New Issue
Block a user