tools: update btstack_root

This commit is contained in:
Milanka Ringwald 2020-11-06 14:20:22 +01:00
parent d3ea2236fc
commit 41e404d30d
3 changed files with 7 additions and 9 deletions

View File

@ -4,6 +4,8 @@ import os
import re
import sys
btstack_root = os.path.abspath(os.path.dirname(sys.argv[0]) + '/../../')
defines_to_add = []
defines_to_remove = []
@ -94,13 +96,6 @@ def write_configuration(full_path, config_file):
bytes = configuration.encode('utf-8')
fout.write(bytes)
btstack_root = os.path.abspath(os.path.dirname(sys.argv[0]) + '/../../port')
config_file = "/Users/mringwal/Projects/btstack/port/arduino/btstack_config.h"
line_ending = get_line_ending(config_file)
# configuration = read_and_update_configuration(config_file, line_ending)
# write_configuration(config_file, configuration)
# sys.exit(0)
for root, dirs, files in os.walk(btstack_root, topdown=True):
for f in files:

View File

@ -144,8 +144,9 @@ def requiresCopyrightUpdate(file_name):
# print "UPdate"
# updateCopyright("../example", "panu_demo.c")
btstack_root = os.path.abspath(os.path.dirname(sys.argv[0]) + '/../..')
for root, dirs, files in os.walk('../', topdown=True):
for root, dirs, files in os.walk(btstack_root, topdown=True):
dirs[:] = [d for d in dirs if d not in ignoreFolders]
files[:] = [f for f in files if f not in ignoreFiles]
for f in files:

View File

@ -2,6 +2,8 @@
import os
import re
btstack_root = os.path.abspath(os.path.dirname(sys.argv[0]) + '/..')
filetag = '#define BTSTACK_FILE__ "%s"\n'
filetag_re = '#define BTSTACK_FILE__ \"(.*)\"'
@ -79,7 +81,7 @@ def get_filename_tag(file_path):
return tag
return None
for root, dirs, files in os.walk('../', topdown=True):
for root, dirs, files in os.walk(btstack_root, topdown=True):
dirs[:] = [d for d in dirs if d not in ignoreFolders]
files[:] = [f for f in files if f not in ignoreFiles]
for f in files: