Skip to content

Commit

Permalink
Tools: create_OEM_board.py: include defaults.parm, don't copy it
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker committed Jun 26, 2024
1 parent cd2a30c commit 87909b5
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Tools/scripts/create_OEM_board.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
import os
import subprocess

import pathlib

board_name = sys.argv[1]
oem_board_name = sys.argv[2]

Expand All @@ -26,8 +28,5 @@
f.write("include ../%s/hwdef-bl.dat" % board_name)
f.close()
if os.path.exists("libraries/AP_HAL_ChibiOS/hwdef/%s/defaults.parm" % board_name):
subprocess.run([
"cp",
"libraries/AP_HAL_ChibiOS/hwdef/%s/defaults.parm" % board_name,
"libraries/AP_HAL_ChibiOS/hwdef/%s/defaults.parm" % oem_board_name,
])
path = pathlib.Path(f"libraries/AP_HAL_ChibiOS/hwdef/{oem_board_name}/defaults.parm")
path.write_text(f"@include ../{board_name}/defaults.parm\n") # noqa

0 comments on commit 87909b5

Please sign in to comment.