Move old scripts and delete stuff now in troggle itself

This commit is contained in:
Philip Sargent
2022-10-21 19:28:07 +01:00
parent fbe28f99de
commit 541236391e
7 changed files with 0 additions and 469 deletions

29
scripts/svxtrace.py Normal file
View File

@@ -0,0 +1,29 @@
#!/usr/bin/python
import sys, os.path, re
reg = re.compile(r'^\*include ([^;\s]*?)\s*$', re.MULTILINE)
def printdeps(filename):
"""Expects a filename relative to script's working directory."""
if(filename[-4:]!='.svx'): filename += ".svx"
print filename
t = file(filename).read()
for m in re.findall(reg, t):
newfname = m
if(newfname[-4:]!='.svx'): newfname += '.svx'
newfname = os.path.normpath(os.path.dirname(filename) + '/' + newfname)
if(os.path.exists(newfname)):
printdeps(newfname)
else: # imitate cavern case-sensitivity workaround
newfname = m.lower()
newfname = os.path.normpath(os.path.dirname(filename) + '/' + newfname)
printdeps(newfname)
if(len(sys.argv) != 2):
print >>sys.stderr, "Usage: %s SVXFILE" % sys.argv[0]
sys.exit(1)
printdeps(sys.argv[1])