From 54a520d4a1151c68d0b4e5f09a8d82466fa499f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Valverde?= Date: Wed, 9 Mar 2016 03:17:51 +0000 Subject: Move /asn1 to /epan/dissectors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I1208fe3c2ba428995526f561e8f792b8d871e9a9 Reviewed-on: https://code.wireshark.org/review/14388 Reviewed-by: Pascal Quantin Petri-Dish: Pascal Quantin Reviewed-by: João Valverde --- tools/asn2wrs.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tools/asn2wrs.py') diff --git a/tools/asn2wrs.py b/tools/asn2wrs.py index 995e751be3..c818882f88 100755 --- a/tools/asn2wrs.py +++ b/tools/asn2wrs.py @@ -594,8 +594,7 @@ def rel_dissector_path(filename): path_parts = os.path.abspath(filename).split(os.sep) while (len(path_parts) > 3 and path_parts[0] != 'asn1'): path_parts.pop(0) - path_parts.insert(0, '..') - path_parts.insert(0, '..') + path_parts.insert(0, '.') return '/'.join(path_parts) @@ -2923,13 +2922,13 @@ class EthOut: out += self.outcomment('Do not modify this file. Changes will be overwritten.', comment) out += self.outcomment('Generated automatically by the ASN.1 to Wireshark dissector compiler', comment) out += self.outcomment(os.path.basename(fn), comment) - out += self.outcomment(' '.join(sys.argv), comment) + out += self.outcomment(' '.join(['asn2wrs.py'] + sys.argv[1:]), comment) out += '\n' # Make Windows path separator look like Unix path separator out = out.replace('\\', '/') # Change absolute paths and relative paths generated outside # source directory to paths relative to asn1/ subdir. - out = re.sub(r'(\s)[./A-Z]\S*(/tools/|/epan/)', r'\1../..\2', out) + out = re.sub(r'(\s)[./A-Z]\S*/dissectors\b', r'\1../..', out) out = re.sub(r'(\s)[./A-Z]\S*/asn1/\S*?([\s/])', r'\1.\2', out) return out -- cgit v1.2.1