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 = script_path + "/" 19 20print("Deleting example in local folder") 21for file in os.listdir(examples_embedded): 22 if not file.endswith(".c"): 23 continue 24 example = file[:-2] 25 apps_folder = apps_btstack + example + "/" 26 if os.path.exists(apps_folder): 27 shutil.rmtree(apps_folder) 28 print("- %s" % example) 29 30print("Deleting example folder") 31examples_folder = apps_btstack + "/examples" 32if os.path.exists(examples_folder): 33 shutil.rmtree(examples_folder) 34