summaryrefslogtreecommitdiff
path: root/lldb/scripts/version-header-fix.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/scripts/version-header-fix.py')
-rwxr-xr-xlldb/scripts/version-header-fix.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/scripts/version-header-fix.py b/lldb/scripts/version-header-fix.py
index 98457e6f5b3c..0caf7c62bc91 100755
--- a/lldb/scripts/version-header-fix.py
+++ b/lldb/scripts/version-header-fix.py
@@ -29,6 +29,10 @@ def main():
input_path = str(args.input_path)
output_path = str(args.output_path)
+ # Create the output dir if it doesn't already exist
+ if not os.path.exists(os.path.dirname(output_path)):
+ os.makedirs(os.path.dirname(output_path))
+
with open(input_path, "r") as input_file:
lines = input_file.readlines()
file_buffer = "".join(lines)