diff --git a/tool/misc/update_btstack_config.py b/tool/misc/update_btstack_config.py index 1e23bf5d4..042ec2bca 100755 --- a/tool/misc/update_btstack_config.py +++ b/tool/misc/update_btstack_config.py @@ -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: diff --git a/tool/misc/update_copyright.py b/tool/misc/update_copyright.py index ab33ebe40..667ada5d7 100755 --- a/tool/misc/update_copyright.py +++ b/tool/misc/update_copyright.py @@ -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: diff --git a/tool/update_filename.py b/tool/update_filename.py index bfe310d6b..795645f2f 100755 --- a/tool/update_filename.py +++ b/tool/update_filename.py @@ -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: