cscope-index.py (3703:fd40ba40aa78) | cscope-index.py (12043:55cd1129e41b) |
---|---|
1#! /usr/bin/python 2# Copyright (c) 2006 The Regents of The University of Michigan 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer; --- 32 unchanged lines hidden (view full) --- 41 42def oksuffix(f): 43 for s in suffixes: 44 if f.endswith(s): 45 return True 46 return False 47 48file_list = file('cscope.files', 'w') | 1#! /usr/bin/python 2# Copyright (c) 2006 The Regents of The University of Michigan 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer; --- 32 unchanged lines hidden (view full) --- 41 42def oksuffix(f): 43 for s in suffixes: 44 if f.endswith(s): 45 return True 46 return False 47 48file_list = file('cscope.files', 'w') |
49cwd = os.getcwd() |
|
49 | 50 |
50for dirpath,subdirs,files in os.walk('src'): | 51for dirpath,subdirs,files in os.walk(os.path.join(cwd, 'src')): |
51 # filter out undesirable subdirectories 52 for i,dir in enumerate(subdirs): 53 if dir == 'SCCS': 54 del subdirs[i] 55 break 56 57 # filter out undesirable absolute paths 58 if dirpath in skipdirs: --- 13 unchanged lines hidden --- | 52 # filter out undesirable subdirectories 53 for i,dir in enumerate(subdirs): 54 if dir == 'SCCS': 55 del subdirs[i] 56 break 57 58 # filter out undesirable absolute paths 59 if dirpath in skipdirs: --- 13 unchanged lines hidden --- |