1#!/usr/bin/env python3 2# 3# Delete project files for all BTstack embedded examples in local port/esp32 folder 4 5import os 6import shutil 7import sys 8import time 9import subprocess 10 11# get script path 12script_path = os.path.abspath(os.path.dirname(sys.argv[0])) 13 14# path to examples 15examples_embedded = script_path + "/../../../example/" 16 17# path to port/esp32 18apps_btstack = "example/" 19 20print("Deleting examples in local folder") 21 22# iterate over btstack examples 23for file in os.listdir(examples_embedded): 24 if not file.endswith(".c"): 25 continue 26 example = file[:-2] 27 apps_folder = apps_btstack + example + "/" 28 if os.path.exists(apps_folder): 29 shutil.rmtree(apps_folder) 30 print("- %s" % example) 31 32