mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 19:07:45 +08:00
header generation script: create dir if it does not exist
This commit is contained in:
@@ -90,6 +90,11 @@ def copy_changed(inputdir, outputdir, prefix=''):
|
|||||||
Copies files from inputdir to outputdir if they don't exist in
|
Copies files from inputdir to outputdir if they don't exist in
|
||||||
ouputdir or if their content changed
|
ouputdir or if their content changed
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# Make sure output directory exists:
|
||||||
|
if not os.path.isdir(outputdir):
|
||||||
|
os.makedirs(outputdir)
|
||||||
|
|
||||||
for f in os.listdir(inputdir):
|
for f in os.listdir(inputdir):
|
||||||
fni = os.path.join(inputdir, f)
|
fni = os.path.join(inputdir, f)
|
||||||
if os.path.isfile(fni):
|
if os.path.isfile(fni):
|
||||||
|
|||||||
Reference in New Issue
Block a user