@@ -458,8 +458,11 @@ def fetch_live_packages(url):
458
458
def check_files_in_directory (directory_path ):
459
459
# Check if the directory exists and is a directory
460
460
if os .path .exists (directory_path ) and os .path .isdir (directory_path ):
461
- # List all files in the directory
462
- files = [f for f in os .listdir (directory_path ) if os .path .isfile (os .path .join (directory_path , f ))]
461
+ files = []
462
+ # Recursively walk through the directory
463
+ for root , _ , filenames in os .walk (directory_path ):
464
+ for filename in filenames :
465
+ files .append (os .path .join (root , filename ))
463
466
return files
464
467
else :
465
468
print ("The directory does not exist." )
@@ -545,7 +548,7 @@ def str2bool(v):
545
548
546
549
# Package all boards as separate packages
547
550
packages = {}
548
- if check_files_in_directory (os .path .join (os .getcwd (), 'bsp/board/include /boards' )):
551
+ if check_files_in_directory (os .path .join (os .getcwd (), 'resources/queries /boards' )):
549
552
packages = package_board_files (
550
553
repo_dir ,
551
554
os .path .join (os .getcwd (), 'bsp/board/include/boards' ),
@@ -557,7 +560,7 @@ def str2bool(v):
557
560
json .dump (packages , metadata , indent = 4 )
558
561
559
562
# Package all cards as separate packages
560
- if check_files_in_directory (os .path .join (os .getcwd (), 'bsp/board/include /mcu_cards' )):
563
+ if check_files_in_directory (os .path .join (os .getcwd (), 'resources/queries /mcu_cards' )):
561
564
packages_cards = package_card_files (
562
565
repo_dir ,
563
566
os .path .join (os .getcwd (), 'bsp/board/include/mcu_cards' ),
0 commit comments