From 5df8813f820756a7fdc2aeca46e51958174ace39 Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Fri, 4 Mar 2016 17:28:21 +0100 Subject: [PATCH] btstack_parser detects btstack_root based on script location --- tool/btstack_parser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tool/btstack_parser.py b/tool/btstack_parser.py index 972df20bf..1bfdce2a8 100755 --- a/tool/btstack_parser.py +++ b/tool/btstack_parser.py @@ -1,9 +1,9 @@ - #!/usr/bin/env python # BlueKitchen GmbH (c) 2014 import re import os +import sys # paths bluetooth_h_path = 'src/bluetooth.h' @@ -13,7 +13,8 @@ hci_cmds_c_path = 'src/hci_cmd.c' hci_cmds_h_path = 'src/hci_cmd.h' hci_h_path = 'src/hci.h' -btstack_root = '../..' +btstack_root = os.path.abspath(os.path.dirname(sys.argv[0]) + '/..') +print ("BTstack root %s" % btstack_root) def set_btstack_root(path): global btstack_root