From c02c7aee2639694a70dd2b068eb9e64c646c639d Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 02:03:54 +0000 Subject: [PATCH] lilypond-1.5.19 --- NEWS | 2 ++ stepmake/bin/package-diff.py | 34 ++++++++++++++++++++++++++++++---- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index bd0d47aa84..6dad565384 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ New features in 1.5 +* Many speedups + * Figured bass support * Improved grace notes diff --git a/stepmake/bin/package-diff.py b/stepmake/bin/package-diff.py index e07dd3ade3..357ab5046a 100644 --- a/stepmake/bin/package-diff.py +++ b/stepmake/bin/package-diff.py @@ -5,7 +5,7 @@ # -import find + import fnmatch import sys import os @@ -14,6 +14,32 @@ import string import getopt import pipes + +_debug = 0 + +_prune = ['(*)'] + +def find(pattern, dir = os.curdir): + list = [] + names = os.listdir(dir) + names.sort() + for name in names: + if name in (os.curdir, os.pardir): + continue + fullname = os.path.join(dir, name) + if fnmatch.fnmatch(name, pattern): + list.append(fullname) + if os.path.isdir(fullname) and not os.path.islink(fullname): + for p in _prune: + if fnmatch.fnmatch(name, p): + if _debug: print "skip", `fullname` + break + else: + if _debug: print "descend into", `fullname` + list = list + find(pattern, fullname) + return list + + topdir = '' def gulp_file(f): try: @@ -87,20 +113,20 @@ def remove_automatic (dirnames): for d in dirnames: try: for p in pats: - files = files + find.find (p, d) + files = files + find (p, d) except: sys.stderr.write ("Can't find dir: %s\n" % d) cleanup () sys.exit (1) - dirs = map (lambda d: find.find ('out*', d), dirnames) + dirs = map (lambda d: find ('out*', d), dirnames) dirs = reduce (lambda x,y: x + y, dirs) #print dirs for d in dirs: if os.path.isdir (d): - files = files + find.find ('*', d) + files = files + find ('*', d) for f in files: try: -- 2.39.5