update deps script

This commit is contained in:
hathach
2023-03-10 22:49:49 +07:00
parent d41320a42e
commit 7c9bd81eca
2 changed files with 21 additions and 15 deletions

View File

@@ -2,11 +2,13 @@ import sys
import subprocess
import os
# TOP is tinyusb root dir
TOP = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
def get_family_dep(family):
for entry in os.scandir("hw/bsp/{}/boards".format(family)):
for entry in os.scandir("{}/hw/bsp/{}/boards".format(TOP, family)):
if entry.is_dir():
result = subprocess.run("make -C examples/device/board_test BOARD={} get-deps".format(entry.name),
result = subprocess.run("make -C {}/examples/device/board_test BOARD={} get-deps".format(TOP, entry.name),
shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
print(result.stdout.decode("utf-8"))
return result.returncode